Open Source Event Calendar 1.2.2 has 21 actions and 119 filters, read directly from its source code on Nov 18, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Open Source Event Calendar fires an action
add_action( 'osec_recurrence_rule_invalid', function( $rrule, $message ) {
// Your code runs here.
}, 10, 2 );
// Change a value Open Source Event Calendar is about to use
add_filter( 'osec_the_content', function( $wpautop ) {
// Change $wpautop here.
return $wpautop;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Alter Event content */ apply_filters( 'osec_the_content', wpautop( EventContentView::factory($this->app)->get_filtered_content($event->get('post'), false) ) ); -
/** * Alter arguments before template file is processed. */ apply_filters( "osecc_theme_args_{$filename}", $args, $is_admin ); -
/** * Add Html content below feeds options */ apply_filters( 'osec_admin_ics_feeds_options_after_settings_html', '', $feedId ); -
/** * Add Html content above feeds options */ apply_filters( 'osec_admin_ics_feeds_options_header_html', '', $feedId ); -
/** * Add Html at calendar navigarion header. */ apply_filters( 'osec_contribution_buttons', '', 'html', 'render-command' ); -
/** * Act on a recurrence rule the generator had to drop. */ do_action( 'osec_recurrence_rule_invalid', $rrule, $message ); -
/** * Show only unique events */ apply_filters( 'osec_show_unique_events', false ); -
/** * Extend taxonomies or tags for Post type Event */ apply_filters( 'osec_add_custom_taxonomies_meta', $taxonomy_metadata ); -
/** * Add adittional HTML buttons on Calendar page view */ apply_filters( 'osec_additional_buttons', '', $view_args ); -
/** * Alter content boxes in Event Edit */ apply_filters( 'osec_admin_edit_event_input_panels_alter', $meta_boxes, $event ); -
/** * Do something on admin taxonomy or tags management page. */ do_action( 'osec_admin_manage_taxonomies' ); -
/** * Short-circuit storing an admin notice. */ apply_filters( 'osec_admin_notification_pre_store', null, $message, $class, $importance, $recipients, $persistent ); -
/** * Alter admin page settings metaboxes. */ apply_filters( 'osec_admin_page_metaboxes_alter', $meta_boxes ); -
/** * Alter or add tabs on AdminPageSettings */ apply_filters( 'osec_admin_setting_sections_alter', $sections ); -
/** * Alter available tabs on Less variables edit admin page. */ apply_filters( 'osec_admin_theme_options_tabs_alter', $sections ); -
/** * Should ticket button be aenabled in agenda view */ apply_filters( 'osec_agenda_ticket_button', false ); -
/** * Alter agenda view events display limit */ apply_filters( 'osec_agenda_view_events_limit', $events_limit ); -
/** * Alter Event before rendering on a single Event page. */ do_action( 'osec_alter_single_event_page_before_render', $event ); -
/** * Alter the order in which media or url fallbacks are evaluated. */ apply_filters( 'osec_avatar_fallback_order', $fallback_order ); -
/** * Alter or add to availabe callback to get Event (avatar) image. */ apply_filters( 'osec_avatar_valid_media_callbacks', $default_fallbacks ); -
/** * Alter or add to availabe callback to get Event (avatar) image. */ apply_filters( 'osec_avatar_valid_url_callbacks', $default_url_fallbacks ); -
/** * Alter the back-to calendar button on single Events */ apply_filters( 'osec_back_to_calendar_button_html_alter', $args ); -
/** * Alter identifier for backend javascript file. */ apply_filters( 'osec_backend_js', self::LOAD_ONLY_BACKEND_SCRIPTS ); -
/** * Add Html below the toolbar on calendar views. */ apply_filters( 'osec_below_toolbar_html', '', $type, $view_args ); -
/** * Alter Block query. */ apply_filters( 'osec_block_query_alter', $query, $atts ); -
/** * Alter buy tickes icon html */ apply_filters( 'osec_buy_tickets_url_icon', '<i class="ai1ec-fa ai1ec-fa-shopping-cart"></i>' ); -
/** * Alter calendar default view arguments */ apply_filters( 'osec_calendar_default_view_args', [ 'post_ids', 'auth_ids', 'cat_ids', 'tag_ids', 'events_limit', 'instance_ids', 'display_filters', 'display_subscribe', 'display_print', 'agenda_toggle', 'display_view_switch', 'display_date_navigation', ] ); -
/** * Alter or add arguments to calendar page filters */ apply_filters( 'osec_calendar_page_filter_args', $filter_args ); -
/** * Alter Calendar view arguments */ apply_filters( 'osec_calendar_view_args_alter', $view_args ); -
/** * Change the Twig arguments */ apply_filters( 'osec_calendar_view_template_alter', $args ); -
/** * Alter or add contact data before render */ apply_filters( 'osec_contact_url_link', $args, $has_data, $event ); -
/** * Allows removing of wp-shortcode tags from Events. */ apply_filters( "osec_content_remove_shortcode_{$tag[2]}", true ); -
/** * Allows you to alter or provide a valid priceCurrency */ apply_filters( 'osec_currency_iso4217_value_alter', $cost_currency, $coast ); -
/** * Add Currency symbols (UTF-8) => ISO 4217 Code */ apply_filters( 'osec_currency_to_iso4217_map', $currencyMap ); -
/** * Add or alter tabs in Admin Taxonomy views */ apply_filters( 'osec_custom_taxonomies', $this->taxonomies ); -
/** * Alter href arguments for datepicker */ apply_filters( 'osec_date_picker_href_args', $href_args, $args ); -
/** * Filter if debug mode should really be enabled [sic!] */ apply_filters( 'osec_dbi_debug', false !== OSEC_DEBUG ); -
/** * Alter default fallback image. */ apply_filters( 'osec_default_avatar_image_path', $file ); -
/** * Allow extensions to add options to the font list. */ apply_filters( 'osec_default_font_options_alter', $this->fonts ); -
/** * Alter $meta_value on post duplications. */ apply_filters( 'osec_duplicate_post_meta_value', $meta_value, $meta_key, $post, $new_id ); -
/** * Do something in runChecks(). */ do_action( 'osec_env_check' ); -
/** * Add additional color */ apply_filters( 'osec_event_color', '', $event ); -
/** * Allow add-ons to modify/add to category color swatch HTML. */ apply_filters( 'osec_event_color_squares', $squares, $event ); -
/** * Alter Event content html */ apply_filters( 'osec_event_content', $to_return ); -
/** * Alter maps data before rendering. */ apply_filters( 'osec_event_map_public_alter', $args ); -
/** * Allow add-ons to modify/add to category data, category image/image size for * REST API.. */ apply_filters( 'osec_event_rest_categories', $categories, $event ); -
/** * Change new Event before save */ apply_filters( 'osec_event_save_new', $this ); -
/** * Do something after Event is saved */ do_action( 'osec_event_saved', $post_id, $this, $update ); -
/** * Alter Event content strict-filters in use. */ apply_filters( 'osec_event_the_content_strict_filters', [ 'wptexturize', 'convert_smilies', 'convert_chars', 'wpautop', ] ); -
/** * Fired when an event's URL cannot be written to the iCalendar export. */ do_action( 'osec_event_url_not_exportable', $url, $exception->getMessage(), $event ); -
/** * Act on an event value that did not fit its database column. */ do_action( 'osec_event_value_too_long', $column, $length, $shortened ); -
/** * Do something mysterious to prepare the filter. */ apply_filters( 'osec_events_relative_to_filter_defaults', [ 'post_ids' => $view_args['post_ids'], 'auth_ids' => $view_args['auth_ids'], 'cat_ids' => $view_args['cat_ids'], 'tag_ids' => $view_args['tag_ids'], 'instance_ids' => $view_args['instance_ids'], ], $view_args, apply_filters('osec_show_unique_events', false) ); -
/** * Alter export events filter. */ apply_filters( 'osec_export_filter', $filter ); -
/** * Change override timzone for feed */ apply_filters( 'osec_feed_timezone_override', $override_timezone, $feed, $x_wr_timezone, $local_timezone ); -
/** * How calendar filters of different types combine. */ apply_filters( 'osec_filter_distinct_types_logic', $default ); -
/** * Alter font directories */ apply_filters( 'osec_font_dirs', [ 'AI1EC' => [ $theme['theme_dir'] . '/font', OSEC_DEFAULT_THEME_ROOT . '/' . OSEC_ROOT_THEME_NAME . '/font', ], ] ); -
/** * Alter View Html output */ apply_filters( "osec_get_{$view}_view_content_alter", $file->get_content(), $view_args ); -
/** * Alter the events displayed in a month. */ apply_filters( 'osec_get_events_for_agenda_alter', $dates, $request ); -
/** * Alter the events displayed in a month. */ apply_filters( 'osec_get_events_for_month_alter', $days_events, $time, $filter ); -
/** * Alter the events displayed in oneday view. */ apply_filters( 'osec_get_events_for_oneday_alter', $days, $start_time, $filter ); -
/** * Alter the events displayed in a week view. */ apply_filters( 'osec_get_events_for_week_alter', $days, $start_of_week, $filter ); -
/** * Alter google maps link */ apply_filters( 'osec_gmaps_link_alter', $url, $event ); -
/** * Add Html above calendar */ apply_filters( 'osec_html_above_calendar', '' ); -
/** * Add Html below calendar. */ apply_filters( 'osec_html_after_calendar', '' ); -
/** * Do something after ICS import is processed. */ do_action( 'osec_ics_after_import', $result ); -
/** * Do something before ICS import is processed. */ do_action( 'osec_ics_before_import', $args ); -
/** * Do something after ICS feed was added. */ do_action( 'osec_ics_feed_added', $feedId, $entry ); -
/** * Do something after feed is deleted */ do_action( 'osec_ics_feed_deleted', $feed_id ); -
/** * Alter feed item data before feed saved in database. */ apply_filters( 'osec_ics_feed_entry', $entry ); -
/** * Alter import alias. */ apply_filters( 'osec_ics_import_alias', $term ); -
/** * Do something after IMPORTED event is saved */ do_action( 'osec_ics_import_event_saved', $event, $feed ); -
/** * Alter FeedsData before processing. */ apply_filters( 'osec_ics_import_pre_init_event', $data, $e, $feed ); -
/** * Alter FeedsData before processing. */ apply_filters( 'osec_import_export_engines_alter', $engines ); -
/** * Ajax request. */ apply_filters( 'osec_is_ajax', $is_ajax = false ); -
/** * Alter javascript translation data. */ apply_filters( 'osec_js_translations', $data ); -
/** * Alter allowed HTML tags and properties on backend rendering. */ apply_filters( 'osec_kses_allowed_html_backend', $backend ); -
/** * Alter allowed HTML tags and properties on frontend rendering. */ apply_filters( 'osec_kses_allowed_html_frontend', $frontend ); -
/** * Alter allowed HTML tags and properties on inlined rendering. */ apply_filters( 'osec_kses_allowed_html_inline', wp_kses_allowed_html('data') ); -
/** * Alter Leaflet geocoder library (leaflet-control-geocoder) */ apply_filters( 'osec_leaflet_geocoder_library_alter', $leaflet_geocoder ); -
/** * Alter Leaflet Library. */ apply_filters( 'osec_leaflet_library_alter', $leaflet ); -
/** * Inject additional constants from extensions */ apply_filters( 'osec_less_constants', $variables ); -
/** * Allow extensions to add their own LESS files */ apply_filters( 'osec_less_files', $this->files ); -
/** * Add variables after user_variables.php is loaded. */ apply_filters( 'osec_less_variables', $variables ); -
/** * Do something after Osec App is loaded. */ do_action( 'osec_loaded', $this->app ); -
/** * Alter Leaflet map options */ apply_filters( 'osec_maps_backend_options_alter', $maps_backend_options ); -
/** * Alter public Leaflet map options */ apply_filters( 'osec_maps_public_options_alter', $this->default_js_params ); -
/** * Should ticket button be enabled in month view */ apply_filters( 'osec_month_ticket_button', false ); -
/** * Change Admin notification Label. */ apply_filters( 'osec_notification_label', __('Open Source Event Calendar', 'open-source-event-calendar') ); -
/** * Alter what Twig var osec_oneday_reveal_button should return */ apply_filters( 'osec_oneday_reveal_button', true ); -
/** * Should ticket button be aenabled in oneday view */ apply_filters( 'osec_oneday_ticket_button', false ); -
/** * Alter OpenStreetMaps link */ apply_filters( 'osec_osm_link_alter', $url, $event ); -
/** * Define if Database schema upgrade should be executed */ apply_filters( 'osec_perform_scheme_update', $do_schema_update ); -
/** * Add html after Event venue */ apply_filters( 'osec_post_form_after_venue_html', '' ); -
/** * Add html before Event venue */ apply_filters( 'osec_post_form_before_venue_html', '' ); -
/** * Register post type Event */ apply_filters( 'osec_pre_register_post_type', $post_type_vars ); -
/** * Alter the calendar theme before the plugin stores it by itself: the default * theme when none is set or the setting is invalid, or the active theme found * again by name when its folder moved (e.g. a site moved to another path). Not * called when an admin activates a theme. */ apply_filters( 'osec_pre_save_current_theme', $theme ); -
/** * Do something befor save Event data. */ do_action( 'osec_pre_save_event', $this, $update ); -
/** * Alter Settings before save. */ apply_filters( 'osec_pre_save_settings', $value ); -
/** * Fired when a stored recurrence rule cannot be exported. */ do_action( 'osec_recurrence_rule_not_exportable', $property . ':' . wp_json_encode($rule), $exception->getMessage(), $event ); -
/** * Filters the point at which an open ended recurrence stops. */ apply_filters( 'osec_recurrence_time_limit', $limit ); -
/** * Act on a recurrence series that hit OSEC_REOCCURRENCE_MAX_INSTANCES. */ do_action( 'osec_recurrence_truncated', $rrule, OSEC_REOCCURRENCE_MAX_INSTANCES ); -
/** * Add or alter theme paths. */ apply_filters( 'osec_register_theme', $theme_dirs ); -
/** * Let extensions add their scripts */ apply_filters( 'osec_render_js', [], $page_to_load ); -
/** * Add extra HTML to single Event view */ apply_filters( 'osec_rendering_single_event_actions', '', $event ); -
/** * Location in to single Event view */ apply_filters( 'osec_rendering_single_event_venues', $location->get_location($event), $event ); -
/** * Alter route filters */ apply_filters( 'osec_request_filter_types', $filter_types ); -
/** * Do something after request parser urls are added. */ do_action( 'osec_request_parser_rules_added', $this ); -
/** * Do something after Less variables are reset. */ do_action( 'osec_reset_less_variables' ); -
/** * Prevent installing robots.txt. */ apply_filters( 'osec_robots_install', true ); -
/** * Alter security regex used to sanitize values before unserialize when * OSEC_LEGACY_COST_SERIALIZED is active. Shoud allow DB records like: */ apply_filters( 'osec_sanitize_unserialize_cost_regex', $regex ); -
/** * Do something before save Event data. */ do_action( 'osec_save_event', $this ); -
/** * Do something before saving an event. */ do_action( 'osec_save_post', $event ); -
/** * Recipients of the email sent when the Event Calendar database update fails. */ apply_filters( 'osec_schema_failure_notification_recipients', $recipients, $message ); -
/** * Alter Select options */ apply_filters( 'osec_settings_select_options', $options, $this->args['id'] ); -
/** * Action after Settings save. */ do_action( 'osec_settings_updated', $options, $new_options ); -
/** * Subscribe buttons alter */ apply_filters( 'osec_subscribe_buttons_arguments', $args ); -
/** * Replace or alter theme path. */ apply_filters( 'osec_theme_loader_path_alter', [$path => $url], $target, $is_extension ); -
/** * Alter all-day badge html. */ apply_filters( 'osec_timespan_allday_badge_html', $allday_html ); -
/** * Alter timespan Html Display. */ apply_filters( 'osec_timespan_html', $date_string, $event, $start_date_display ); -
/** * Timespan pefix string/html */ apply_filters( 'osec_timespan_time_html_before_start_html', $timeSeparator ); -
/** * Timespan suffix string follows a time. * */ apply_filters( 'osec_timespan_time_html_suffix', $timespanSuffix ); -
/** * Timespan separator string/html */ apply_filters( 'osec_timespan_time_separator_html', $timespanSeparator ); -
/** * Venue separator */ apply_filters( 'osec_title_venue_separator', $venueSeparator ); -
/** * Alter Twig environment variables */ apply_filters( 'osec_twig_environment_settings_alter', $environment ); -
/** * Alter Ui date format "long". */ apply_filters( 'osec_ui_date_format_long', $date_format ); -
/** * Alter frontend date format "short". */ apply_filters( 'osec_ui_date_format_short', $format, $add_year ); -
/** * Allows to alter translated strings in Shortcode embed text. */ apply_filters( 'osec_viewing_events_shortcodes_alter', $args ); -
/** * Alter what Twig var show_reveal_button should return */ apply_filters( 'osec_week_reveal_button', true ); -
/** * Should ticket button be enabled in week view */ apply_filters( 'osec_week_ticket_button', false ); -
/** * Post process saving of save handler value. */ apply_filters( "osec{$method}", $value ); -
apply_filters( 'the_title', $event->get('post')->post_title ); -
apply_filters( 'duplicate_post_get_clone_post_link', wp_nonce_url( admin_url('admin.php' . $action), 'ai1ec_clone_' . $post->ID ), $post->ID, $context ); -
apply_filters( 'excerpt_length', $length ); -
apply_filters( 'excerpt_more', $more ); -
apply_filters( 'osec_clean_cache_on_upgrade', true ); -
apply_filters( 'osec_twig_add_debug', true ); -
apply_filters( 'redirect_post_location', $location, $post_id ); -
apply_filters( 'the_content', $event_post->post_content ); -
apply_filters( 'wp_trim_excerpt', $text, $raw_excerpt ); -
apply_filters( 'wpml_element_trid', null, $page_id, 'post_' . OSEC_POST_TYPE );
Generated from Open Source Event Calendar's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: