Skip to content

FluentCommunity Filters ​

1 filter hook on this page, across 1 call site.

HookFiltersCall Sites
fluent_event/community/route_pathsFilters the FluentCommunity portal routes that FluentEvent adds.1

fluent_event/community/route_paths ​

  • Type: filter
  • Call sites: 1
  • When it fires: Filters the FluentCommunity portal routes that FluentEvent adds.

Runs once, on first use, when the FluentEvent feature is on in FluentCommunity. The base slug comes from FluentCommunity's FluentEvent settings (default events); this filter can move any single route. Keep the :event_slug placeholder in the routes that have it.

Parameters ​

#NameTypeDescription
1$pathsarrayRoute name => portal path. Keys: events, create_event, edit_event, event_view, space_events, space_event_view.
2$routeSlugstringThe base slug, for example events.

Return: array — the filtered paths.

Call Sites ​

SourceContextArguments
fluent-event/Modules/FluentCommunity/PortalHandler.php:36PortalHandler::routePaths()[ 'events' => $this->routeSlug, 'create_event' => $this->routeSlug . '/create', 'edit_event' => $this->routeSlug . '/:event_slug/edit', 'event_view' => $this->routeSlug . '/:event_slug', 'space_events' => $this->routeSlug, 'space_event_view' => $this->routeSlug . '/:event_slug', ], $this->routeSlug

Example ​

php
add_filter('fluent_event/community/route_paths', function ($paths, $routeSlug) {
    $paths['create_event'] = $routeSlug . '/new';

    return $paths;
}, 10, 2);

FluentEvent developer documentation