Exemplo n.º 1
0
 /**
  * Fetches the JSON-LD data for this type of object
  *
  * @param  int|WP_Post|null $post The post/organizer
  * @param  array  $args
  * @return array
  */
 public function get_data($post = null, $args = array('context' => false))
 {
     $data = parent::get_data($post, $args);
     // If we have an Empty data we just skip
     if (empty($data)) {
         return array();
     }
     // Fetch first key
     $post_id = key($data);
     // Fetch first Value
     $data = reset($data);
     $data->telephone = tribe_get_organizer_phone($post_id);
     $data->email = tribe_get_organizer_email($post_id);
     $data->sameAs = tribe_get_organizer_website_url($post_id);
     return array($post_id => $data);
 }
<ul>
<?php 
$args = array('post_status' => 'publish', 'post_type' => 'tribe_organizer', 'posts_per_page' => -1, 'order' => 'ASC', 'orderby' => 'title');
$get_posts = null;
$get_posts = new WP_Query();
$get_posts->query($args);
if ($get_posts->have_posts()) {
    while ($get_posts->have_posts()) {
        $get_posts->the_post();
        ?>

        <li>
          <a href="<?php 
        echo tribe_get_organizer_website_url();
        ?>
" target="_blank"><?php 
        echo tribe_get_organizer();
        ?>
</a>
		  
		  

						<?php 
        $args = array('post_type' => array(TribeEvents::POSTTYPE), 'posts_per_page' => -1, 'order' => 'ASC', 'meta_query' => array(array('key' => '_EventOrganizerID', 'value' => get_the_ID(), 'compare' => 'LIKE')), 'orderby' => 'date');
        $events = new WP_Query($args);
        if ($events->have_posts()) {
            ?>
							<ul>
									<li><b>Upcoming Events</b></li>							  
							  <?php 
Exemplo n.º 3
0
 * This is ALSO used in the Organizer edit view. Be careful to test changes in both places.
 *
 * Override this template in your own theme by creating a file at
 * [your-theme]/tribe-events/community/modules/organizer.php
 *
 * @package TribeCommunityEvents
 * @since  2.1
 * @author Modern Tribe Inc.
 *
 */
if (!defined('ABSPATH')) {
    die('-1');
}
$organizer_name = esc_attr(tribe_get_organizer());
$organizer_phone = esc_attr(tribe_get_organizer_phone());
$organizer_website = esc_url(tribe_get_organizer_website_url());
$organizer_email = esc_attr(tribe_get_organizer_email());
if (!isset($event)) {
    $event = null;
}
?>

<!-- Organizer -->
<div class="tribe-events-community-details eventForm bubble" id="event_organizer">

	<table class="tribe-community-event-info" cellspacing="0" cellpadding="0">

		<tr>
			<td colspan="2" class="tribe_sectionheader">
				<h4><?php 
_e('Event Organizer Details', 'tribe-events-community');