Events Calendar for LearnDash Actions & Filters for Developers - Honors WP

Actions & Filters for Developers

Events Calendar for LearnDash Filters

Limit the Number of Events Shown #

add_filter(‘immerseus_calendar_map_calendar_events_query_max_events’, function( $amount_of_events, $user_id ) {
$amount_of_events = 10;

// Check for a specific user id
if( 1 === $user_id ) {
$amount_of_events = 10000000;
}
// Always return.
return $amount_of_events;
}, 2, 10);

add_filter(‘immerseus_calendar_map_calendar_events_query_max_events’, function( ) {
return 1;
});

Allow Students to Create Their Own Events #

add_filter(‘immerseus_calendar_public_allow_students_to_add_events’)

  • Defaults to allow logged-in users to add events (i.e. shows the add event button), if set to false, no button shows.

add_filter(‘immerseus_calendar_public_user_role_override_show_add_events’)

  • Only takes effect if the previous filter is ‘false’, defaults to ‘manage_options’ (= admin capabilities) can be changed to other caps. If they don’t want to show add event buttons for any user cap, they have to return false.

Change Calendar Display Language #

Changes the calendar display language from hardcoded English to the locale set in the WP admin.

add_filter(‘immerseus_calendar_public_use_server_locale’)

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Your cart is empty.
Shopping Cart
  • Your cart is empty.
Scroll to Top