/** * Setup meta display in this template * * @return void **/ public function setup_meta() { parent::setup_meta(); // setup the template for the meta group tribe_set_the_meta_template('tribe_event_venue', array('before' => '', 'after' => '', 'label_before' => '', 'label_after' => '', 'meta_before' => '<address class="venue-address">', 'meta_after' => '</address>'), 'meta_group'); // setup the template for the meta items tribe_set_the_meta_template(array('tribe_event_venue_address', 'tribe_event_venue_phone', 'tribe_event_venue_website'), array('before' => '', 'after' => '', 'label_before' => '', 'label_after' => '', 'meta_before' => '<span class="%s">', 'meta_after' => '</span>')); // turn off the venue name in the group tribe_set_the_meta_visibility('tribe_event_venue_name', false); // remove the title for the group & meta items tribe_set_meta_label('tribe_event_venue', '', 'meta_group'); tribe_set_meta_label(array('tribe_event_venue_address' => '', 'tribe_event_venue_phone' => '', 'tribe_event_venue_website' => '')); // set meta item priorities tribe_set_meta_priority(array('tribe_event_venue_address' => 10, 'tribe_event_venue_phone' => 20, 'tribe_event_venue_website' => 30)); add_filter('tribe_event_meta_venue_address_gmap', '__return_false'); // disable venue info from showing on list module (since it's duplicate of this view) tribe_set_the_meta_visibility('tribe_list_venue_name_address', false); }
/** * Set the meta priority to manage positioning. * * @param $meta_id * @param int $priority * @param string $type * * @return bool */ function tribe_set_meta_priority($meta_id, $priority = 100, $type = 'meta') { if (is_array($meta_id)) { foreach ($meta_id as $id => $priority) { tribe_set_meta_priority($id, $priority, $type); } } else { global $_tribe_meta_factory; // die silently if the requested meta group is not registered if (!Tribe__Events__Meta_Factory::check_exists($meta_id, $type)) { return false; } if (!empty($priority)) { $_tribe_meta_factory->{$type}[$meta_id]['priority'] = $priority; } } }