public static function setup_tribe_posts_manager()
 {
     global $sc_filters;
     $filter_array = array('sc_phone' => array('name' => self::__('Phone'), 'meta' => '_phone'), 'sc_facebook' => array('name' => self::__('Facebook'), 'meta' => '_facebook'), 'sc_linkedin' => array('name' => self::__('Linkedin'), 'meta' => '_linkedin'), 'sc_skype' => array('name' => self::__('Skype'), 'meta' => '_skype'), 'sc_twitter' => array('name' => self::__('Twitter'), 'meta' => '_twitter'), 'sc_website' => array('name' => self::__('Website'), 'meta' => '_website'));
     $sc_filters = tribe_setup_apm(Sprout_Client::POST_TYPE, $filter_array);
     $sc_filters->do_metaboxes = false;
 }
 /**
  * Create the events APM with the additional APM filters that TEC uses.
  *
  * @return void
  */
 public function ecp_filters()
 {
     $filter_args = array('ecp_venue_filter_key' => array('name' => __('Venue', 'tribe-events-calendar-pro'), 'custom_type' => 'ecp_venue_filter', 'sortable' => 'true'), 'ecp_organizer_filter_key' => array('name' => __('Organizer', 'tribe-events-calendar-pro'), 'custom_type' => 'ecp_organizer_filter', 'sortable' => 'true'), 'ecp_start_date' => array('name' => __('Start Date', 'tribe-events-calendar-pro'), 'custom_type' => 'custom_date', 'disable' => 'columns'), 'ecp_end_date' => array('name' => __('End Date', 'tribe-events-calendar-pro'), 'custom_type' => 'custom_date', 'disable' => 'columns'), 'ecp_cost' => array('name' => __('Event Cost', 'tribe-events-calendar-pro'), 'meta' => '_EventCost', 'cast' => 'NUMERIC'), 'ecp_cat' => array('name' => __('Event Cats', 'tribe-events-calendar-pro'), 'taxonomy' => TribeEvents::TAXONOMY, 'disable' => 'columns'), 'ecp_title' => array('name' => __('Title', 'tribe-events-calendar-pro'), 'custom_type' => 'title', 'disable' => 'columns'), 'ecp_recur' => array('name' => __('Recurring', 'tribe-events-calendar-pro'), 'custom_type' => 'recur', 'disable' => 'columns'), 'ecp_content' => array('name' => __('Description', 'tribe-events-calendar-pro'), 'custom_type' => 'content', 'disable' => 'columns'));
     global $ecp_apm;
     $ecp_apm = tribe_setup_apm(TribeEvents::POSTTYPE, $filter_args);
     $ecp_apm->do_metaboxes = false;
     $ecp_apm->add_taxonomies = false;
 }
Exemple #3
0
 public function test_filters()
 {
     $filter_args = array('release_date' => array('name' => 'Release Date', 'meta' => '_release_date', 'cast' => 'DATE', 'date_format' => 'M j, Y'), 'stars' => array('name' => 'Stars', 'meta' => '_stars', 'options' => array('0.5' => '½', '1' => '1', '1.5' => '1 ½', '2' => '2', '2.5' => '2 ½', '3' => '3', '3.5' => '3 ½', '4' => '4'), 'cast' => 'DECIMAL'), 'director' => array('name' => 'Director', 'meta' => '_director', 'metabox' => 'my_box'), 'tribe_post_status' => array('name' => 'Status', 'custom_type' => 'post_status', 'sortable' => true));
     $boxes = array('my_box' => 'Awesome Box');
     $labels = array('name' => 'Demo Movies', 'singular_name' => 'Demo Movie', 'add_new_item' => 'Add New Demo Movie');
     register_post_type($this->post_type, array('show_ui' => true, 'labels' => $labels, 'supports' => array('title')));
     register_taxonomy('tribe_studio', $this->post_type, array('show_ui' => true, 'hierarchical' => true, 'labels' => array('name' => 'Studios', 'singluar_name' => 'Studio')));
     register_taxonomy('tribe_genre', $this->post_type, array('show_ui' => true, 'hierarchical' => true, 'labels' => array('name' => 'Genres', 'singluar_name' => 'Genre')));
     global $cpt_filters;
     $cpt_filters = tribe_setup_apm($this->post_type, $filter_args, $boxes);
 }