Example #1
0
 /**
  * Initializes admin-specific items for the events admin list dashboard page. Hooked to the
  * current_screen action
  *
  * @param WP_Screen $screen WP Admin screen object for the current page
  */
 public function init_admin_list_screen($screen)
 {
     if ('edit' !== $screen->base) {
         return;
     }
     if (self::POSTTYPE !== $screen->post_type) {
         return;
     }
     Tribe__Events__Admin_List::init();
 }
 /**
  * This will only be fired if Advanced Post Manger is active
  * Helps ensure dates show correctly if only one or the other of
  * start & end date columns is showing
  */
 public static function column_headers_check($columns)
 {
     $active = array_keys($columns);
     self::$end_col_active = in_array('end-date', $active);
     self::$start_col_active = in_array('start-date', $active);
     // What if, oddly, end_col is placed first when both are active?
     if (self::$end_col_active && self::$start_col_active) {
         self::$start_col_first = array_search('start-date', $active) < array_search('end-date', $active);
     }
 }
Example #3
0
 /**
  * Initializes admin-specific items for the events admin list dashboard page. Hooked to the
  * current_screen action
  *
  * @param WP_Screen $screen WP Admin screen object for the current page
  */
 public function init_admin_list_screen($screen)
 {
     // If we are dealing with a AJAX call just drop these checks
     if (!Tribe__Main::instance()->doing_ajax()) {
         if ('edit' !== $screen->base) {
             return;
         }
         if (self::POSTTYPE !== $screen->post_type) {
             return;
         }
     }
     Tribe__Events__Admin_List::init();
 }