Skip to content

Calendars Filters ​

3 filter hooks on this page, across 3 call sites.

HookFiltersCall Sites
fluent_event/calendar_api_responseFilters one calendar's admin payload before it is returned.1
fluent_event/calendar_title_max_lengthFilters the longest calendar title accepted, in characters.1
fluent_event/calendars_api_responseFilters the admin calendars list before it is returned.1

fluent_event/calendar_api_response ​

  • Type: filter
  • Call sites: 1
  • When it fires: Filters one calendar's admin payload before it is returned.

Wraps GET /calendars/{id}. The calendar carries creator_name, and stats holds the calendar's event and guest totals.

Parameters ​

#NameTypeDescription
1$dataarray['calendar' => Calendar, 'stats' => array].
2$requestarrayAll request parameters.

Return: array — the filtered data.

Call Sites ​

SourceContextArguments
fluent-event/app/Http/Controllers/CalendarController.php:78CalendarController::getCalendar()$data, $request->all()

Listeners Inside FluentEvent ​

FluentEvent itself listens to this hook. Use a priority below or above these to run before or after them.

PriorityHandlerSource
10[$this, 'addSpaceUrl']fluent-event/Modules/FluentCommunity/SpaceHandler.php:16

Example ​

php
add_filter('fluent_event/calendar_api_response', function ($data, $request) {
    // Change and return the first argument.
    return $data;
}, 10, 2);

fluent_event/calendar_title_max_length ​

  • Type: filter
  • Call sites: 1
  • When it fires: Filters the longest calendar title accepted, in characters.

The default is 100. The value is clamped to 1–255, the size of the title column.

Parameters ​

#NameTypeDescription
1$lengthintMaximum title length. Default 100.

Return: int — the filtered length.

Call Sites ​

SourceContextArguments
fluent-event/app/Models/Calendar.php:51Calendar::titleMaxLength()100

Example ​

php
add_filter('fluent_event/calendar_title_max_length', function () {
    return 150;
});

fluent_event/calendars_api_response ​

  • Type: filter
  • Call sites: 1
  • When it fires: Filters the admin calendars list before it is returned.

Wraps GET /calendars. Each calendar carries events_count and guests_count. The FluentCommunity bridge adds space_url to calendars that belong to a discussion space.

Parameters ​

#NameTypeDescription
1$dataarray['calendars' => collection of Calendar, 'counts' => array]. counts holds all plus one key per status.
2$requestarrayAll request parameters.

Return: array — the filtered data.

Call Sites ​

SourceContextArguments
fluent-event/app/Http/Controllers/CalendarController.php:42CalendarController::getAllCalendars()$data, $request->all()

Listeners Inside FluentEvent ​

FluentEvent itself listens to this hook. Use a priority below or above these to run before or after them.

PriorityHandlerSource
10[$this, 'addSpaceUrls']fluent-event/Modules/FluentCommunity/SpaceHandler.php:17

Example ​

php
add_filter('fluent_event/calendars_api_response', function ($data, $request) {
    // Change and return the first argument.
    return $data;
}, 10, 2);

FluentEvent developer documentation