SimpleCalendarAjax

Front facing ajax.

Defined (1)

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

/includes/ajax.php  
  1. class Ajax { 
  2.  
  3. /** 
  4. * Hook in tabs. 
  5. * @since 3.0.0 
  6. */ 
  7. public function __construct() { 
  8. add_action( 'init', array( $this, 'add_callbacks' ), 100 ); 
  9.  
  10. /** 
  11. * Add ajax callbacks. 
  12. * @since 3.0.0 
  13. */ 
  14. public function add_callbacks() { 
  15.  
  16. $calendars = simcal_get_calendar_types(); 
  17.  
  18. foreach ( $calendars as $calendar => $views ) { 
  19.  
  20. foreach ( $views as $view ) { 
  21.  
  22. $the_view = simcal_get_calendar_view( 0, $calendar . '-' . $view ); 
  23.  
  24. if ( $the_view instanceof Calendar_View ) { 
  25. $the_view->add_ajax_actions(); 
  26.  
  27. do_action( 'simcal_add_ajax_callbacks' ); 
  28.