simcal_default_calendar_type

The Simple Calendar simcal default calendar type hook.

Description

apply_filters( 'simcal_default_calendar_type', (string) $default_calendar ); 

Parameters (1)

0. $default_calendar (string) => 'default-calendar'
The default calendar.

Usage

To run the hook, copy the example below.
  1. $default_calendar = apply_filters( 'simcal_default_calendar_type', $default_calendar ); 
  2.  
  3. if ( !empty( $default_calendar ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the simcal_default_calendar_type callback 
  2. function filter_simcal_default_calendar_type( $default_calendar ) { 
  3. // make filter magic happen here... 
  4. return $default_calendar
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'simcal_default_calendar_type', 'filter_simcal_default_calendar_type', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'simcal_default_calendar_type', 'filter_simcal_default_calendar_type', 10, 1 ); 

Defined (2)

The filter is defined in the following location(s).

/includes/admin/metaboxes/settings.php  
  1. $calendar_type = apply_filters( 'simcal_default_calendar_type', 'default-calendar' ); 
  1. $calendar_type = isset( $_POST['_calendar_type'] ) ? sanitize_title( stripslashes( $_POST['_calendar_type'] ) ) : apply_filters( 'simcal_default_calendar_type', 'default-calendar' );