当前位置: 首页>>代码示例>>PHP>>正文


PHP tribe_events_event_schedule_details函数代码示例

本文整理汇总了PHP中tribe_events_event_schedule_details函数的典型用法代码示例。如果您正苦于以下问题:PHP tribe_events_event_schedule_details函数的具体用法?PHP tribe_events_event_schedule_details怎么用?PHP tribe_events_event_schedule_details使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了tribe_events_event_schedule_details函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: render_single_event_title

    public static function render_single_event_title()
    {
        $event_id = get_the_ID();
        ?>
		<div class="fusion-events-single-title-content">
			<?php 
        the_title('<h2 class="tribe-events-single-event-title summary entry-title">', '</h2>');
        ?>

			<div class="tribe-events-schedule updated published tribe-clearfix">
				<?php 
        echo tribe_events_event_schedule_details($event_id, '<h3>', '</h3>');
        ?>
				<?php 
        if (tribe_get_cost()) {
            ?>
					<span class="tribe-events-divider">|</span>
					<span class="tribe-events-cost"><?php 
            echo tribe_get_cost(null, true);
            ?>
</span>
				<?php 
        }
        ?>
			</div>
		</div>
		<?php 
    }
开发者ID:universal-youth,项目名称:www.universal-youth.com,代码行数:28,代码来源:class-avada-eventscalendar.php

示例2: shortcode_handler

 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $atts = shortcode_atts(array('categories' => "", 'items' => "3", 'paginate' => "no"), $atts, $this->config['shortcode']);
     $output = "";
     $posts = $this->query_entries($atts);
     $entries = $posts->posts;
     if (class_exists('Tribe__Events__Pro__Main')) {
         $ecp = Tribe__Events__Pro__Main::instance();
         $ecp->disable_recurring_info_tooltip();
     }
     if (!empty($entries)) {
         global $post;
         $default_id = $post->ID;
         $output .= "<div class='av-upcoming-events " . $meta['el_class'] . "'>";
         foreach ($entries as $entry) {
             $class = "av-upcoming-event-entry";
             $image = get_the_post_thumbnail($entry->ID, 'square', array('class' => 'av-upcoming-event-image'));
             $class .= !empty($image) ? " av-upcoming-event-with-image" : " av-upcoming-event-without-image";
             $title = get_the_title($entry->ID);
             $link = get_permalink($entry->ID);
             $post->ID = $entry->ID;
             //temp set of the post id so that tribe fetches the correct price symbol
             $price = tribe_get_cost($entry->ID, true);
             $venue = tribe_get_venue($entry->ID);
             $post->ID = $default_id;
             $output .= "<a href='{$link}' class='{$class}'>";
             if ($image) {
                 $output .= $image;
             }
             $output .= "<span class='av-upcoming-event-data'>";
             $output .= "<h4 title='av-upcoming-event-title'>{$title}</h4>";
             $output .= "<span class='av-upcoming-event-meta'>";
             $output .= "<span class='av-upcoming-event-schedule'>" . tribe_events_event_schedule_details($entry) . "</span>";
             if ($price) {
                 $output .= "<span class='av-upcoming-event-cost'>{$price}</span>";
             }
             if ($price && $venue) {
                 $output .= " - ";
             }
             if ($venue) {
                 $output .= "<span class='av-upcoming-event-venue'>{$venue}</span>";
             }
             $output .= apply_filters('avf_upcoming_event_extra_data', "", $entry);
             $output .= "</span>";
             $output .= "</span>";
             $output .= "</a>";
         }
         if ($atts['paginate'] == "yes" && ($avia_pagination = avia_pagination($posts->max_num_pages, 'nav'))) {
             $output .= "<div class='pagination-wrap pagination-" . Tribe__Events__Main::POSTTYPE . "'>{$avia_pagination}</div>";
         }
         $output .= "</div>";
     }
     if (class_exists('Tribe__Events__Pro__Main')) {
         // Re-enable recurring event info
         $ecp->enable_recurring_info_tooltip();
     }
     return $output;
 }
开发者ID:erikdukker,项目名称:medisom,代码行数:66,代码来源:events_upcoming.php

示例3: set_banner_subtitle

 /**
  * Set the banner subtitle for a single event.
  *
  * @return  string
  * @access  public
  * @since   1.0.0
  */
 public function set_banner_subtitle($subtitle)
 {
     if (is_singular('tribe_events')) {
         $subtitle = tribe_events_event_schedule_details(get_the_ID());
     }
     return $subtitle;
 }
开发者ID:Charitable,项目名称:Reach,代码行数:14,代码来源:class-reach-tribe-events.php

示例4: tribe_get_cost

<?php 
if (tribe_get_cost()) {
    ?>

	<div class="tribe-events-event-cost">
		<span><?php 
    echo tribe_get_cost(null, true);
    ?>
</span>
	</div>
<?php 
}
?>
	<div class="tribe-event-schedule-details">
		<?php 
echo tribe_events_event_schedule_details();
?>

	</div>
<!-- Event Title -->
<?php 
do_action('tribe_events_before_the_event_title');
?>
<h2 class="tribe-events-list-event-title">
	<a class="tribe-event-url" href="<?php 
echo esc_url(tribe_get_event_link());
?>
" title="<?php 
the_title_attribute();
?>
" rel="bookmark">
开发者ID:AC85,项目名称:musikschule-wp-theme,代码行数:31,代码来源:single-event.php

示例5: tribe_events_template_data

 /**
  * Returns json for javascript templating functions throughout the plugin.
  *
  * @category Events
  *
  * @param $event
  * @param $additional
  *
  * @return string
  */
 function tribe_events_template_data($event, array $additional = null)
 {
     $has_image = false;
     $image_src = '';
     $image_tool_src = '';
     $date_display = '';
     //Disable recurring event info in tooltip
     if (class_exists('Tribe__Events__Pro__Main')) {
         $ecp = Tribe__Events__Pro__Main::instance();
         $ecp->disable_recurring_info_tooltip();
         $date_display = strip_tags(tribe_events_event_schedule_details($event));
         // Re-enable recurring event info
         $ecp->enable_recurring_info_tooltip();
     } else {
         $date_display = strip_tags(tribe_events_event_schedule_details($event));
     }
     if (function_exists('has_post_thumbnail') && has_post_thumbnail($event->ID)) {
         $has_image = true;
         $image_arr = wp_get_attachment_image_src(get_post_thumbnail_id($event->ID), 'medium');
         $image_src = $image_arr[0];
     }
     if ($has_image) {
         $image_tool_arr = wp_get_attachment_image_src(get_post_thumbnail_id($event->ID), array(75, 75));
         $image_tool_src = $image_tool_arr[0];
     }
     if (has_excerpt($event->ID)) {
         $excerpt = $event->post_excerpt;
     } else {
         $excerpt = $event->post_content;
     }
     $excerpt = Tribe__Events__Main::instance()->truncate($excerpt, 30);
     $category_classes = tribe_events_event_classes($event->ID, false);
     $json = array('eventId' => $event->ID, 'title' => $event->post_title, 'permalink' => tribe_get_event_link($event->ID), 'imageSrc' => $image_src, 'dateDisplay' => $date_display, 'imageTooltipSrc' => $image_tool_src, 'excerpt' => $excerpt, 'categoryClasses' => $category_classes);
     /**
      * Template overrides (of month/tooltip.php) set up in 3.9.3 or earlier may still expect
      * these vars and will break without them, so they are being kept temporarily for
      * backwards compatibility purposes.
      *
      * @todo consider removing in 4.0
      */
     $json['startTime'] = tribe_get_start_date($event);
     $json['endTime'] = tribe_get_end_date($event);
     if ($additional) {
         $json = array_merge((array) $json, (array) $additional);
     }
     $json = apply_filters('tribe_events_template_data_array', $json, $event, $additional);
     $json = tribe_prepare_for_json_deep($json);
     return json_encode($json);
 }
开发者ID:TMBR,项目名称:johnjohn,代码行数:59,代码来源:general.php

示例6: tribe_events_template_data

 /**
  * Returns json for javascript templating functions throughout the plugin.
  *
  * @category Events
  *
  * @param $event
  * @param $additional
  *
  * @return string
  */
 function tribe_events_template_data($event = null, array $additional = null)
 {
     // Base JSON variable
     $json = array('i18n' => array());
     if (!is_null($event)) {
         $event = get_post($event);
         // Check if we are dealing with an Event
         if (is_object($event) && $event instanceof WP_Post && tribe_is_event($event->ID)) {
             $has_image = false;
             $image_src = '';
             $image_tool_src = '';
             $date_display = '';
             //Disable recurring event info in tooltip
             if (class_exists('Tribe__Events__Pro__Main')) {
                 $ecp = Tribe__Events__Pro__Main::instance();
                 $ecp->disable_recurring_info_tooltip();
                 $date_display = strip_tags(tribe_events_event_schedule_details($event));
                 // Re-enable recurring event info
                 $ecp->enable_recurring_info_tooltip();
             } else {
                 $date_display = strip_tags(tribe_events_event_schedule_details($event));
             }
             if (function_exists('has_post_thumbnail') && has_post_thumbnail($event->ID)) {
                 $has_image = true;
                 $image_arr = wp_get_attachment_image_src(get_post_thumbnail_id($event->ID), 'medium');
                 $image_src = $image_arr[0];
             }
             if ($has_image) {
                 $image_tool_arr = wp_get_attachment_image_src(get_post_thumbnail_id($event->ID), array(75, 75));
                 $image_tool_src = $image_tool_arr[0];
             }
             if (has_excerpt($event->ID)) {
                 $excerpt = $event->post_excerpt;
             } else {
                 $excerpt = $event->post_content;
             }
             $excerpt = Tribe__Events__Main::instance()->truncate($excerpt, 30);
             $category_classes = tribe_events_event_classes($event->ID, false);
             $json['eventId'] = $event->ID;
             $json['title'] = $event->post_title;
             $json['permalink'] = tribe_get_event_link($event->ID);
             $json['imageSrc'] = $image_src;
             $json['dateDisplay'] = $date_display;
             $json['imageTooltipSrc'] = $image_tool_src;
             $json['excerpt'] = $excerpt;
             $json['categoryClasses'] = $category_classes;
             /**
              * Template overrides (of month/tooltip.php) set up in 3.9.3 or earlier may still expect
              * these vars and will break without them, so they are being kept temporarily for
              * backwards compatibility purposes.
              *
              * @todo consider removing in 4.0
              */
             $json['startTime'] = tribe_get_start_date($event);
             $json['endTime'] = tribe_get_end_date($event);
         }
     }
     /**
      * Internationalization Strings
      */
     $json['i18n']['find_out_more'] = esc_attr__('Find out more »', 'tribe-events-calendar');
     $json['i18n']['for_date'] = esc_attr(sprintf(__('%s for', 'tribe-events-calendar'), tribe_get_event_label_plural()));
     if ($additional) {
         $json = array_merge((array) $json, (array) $additional);
     }
     $json = apply_filters('tribe_events_template_data_array', $json, $event, $additional);
     $json = tribe_prepare_for_json_deep($json);
     return json_encode($json);
 }
开发者ID:NallelyFlores89,项目名称:cronica-ambiental,代码行数:79,代码来源:general.php

示例7: tribe_get_events_link

?>

    <div class="byline">

        <a class="categoria-noticia" href="<?php 
echo tribe_get_events_link();
?>
"> Agenda</a>

        <?php 
the_title('<h2 class="tribe-events-single-event-title summary entry-title single-title">', '</h2>');
?>

        <div class="tribe-events-schedule updated published tribe-clearfix">
            <?php 
echo tribe_events_event_schedule_details($event_id, '', '');
?>
            <?php 
if (tribe_get_cost()) {
    ?>
                <span class="tribe-events-divider">|</span>
                <span class="tribe-events-cost"><?php 
    echo tribe_get_cost(null, true);
    ?>
</span>
            <?php 
}
?>
        </div>
    </div>
开发者ID:hernan224,项目名称:Ingwhite,代码行数:30,代码来源:single-event.php

示例8: tribe_get_event_link

    echo tribe_get_event_link();
    ?>
"><?php 
    the_post_thumbnail('homepage-thumb', array('class' => "img-responsive"));
    ?>
</a>
	<?php 
}
?>
	<?php 
$sep = "";
if (tribe_get_city() && tribe_get_stateprovince()) {
    $sep = ", ";
}
?>
	<h2><a href="<?php 
echo tribe_get_event_link();
?>
"><?php 
the_title();
?>
</a></h2>
	<?php 
echo tribe_events_event_schedule_details($event_id, '<span class="date small">', '</span>');
?>
	<h3><?php 
echo tribe_get_city() . $sep . tribe_get_stateprovince();
?>
</h3>
	<?php 
the_excerpt();
开发者ID:ethicalux,项目名称:kairos_eux_berc,代码行数:31,代码来源:content-tribe_events.php

示例9: displayPosts

 /**
  * Display the related posts
  *
  * @since 1.0
  * @author Modern Tribe
  * @param string $tags comma-separated list of tags.
  * @param int $count number of related posts to return.
  * @param string $blog the blog from which to fetch the related posts.
  * @param bool $only_display_related whether to display only related posts or others as well.
  * @param bool $thumbnails whether to display thumbnails or not.
  * @param string $post_type the type of post to return.
  * @return void
  */
 public function displayPosts($tag = false, $category = false, $count = 5, $blog = false, $only_display_related = false, $thumbnails = false, $post_type = 'post')
 {
     // Create an array of types if the user submitted more than one.
     $post_type = explode(',', $post_type);
     $posts = self::getPosts($tag, $category, $count, $blog, $only_display_related, $post_type);
     if (is_array($posts) && count($posts)) {
         echo '<ul class="tribe-related-posts">';
         foreach ($posts as $post) {
             echo '<li>';
             if ($thumbnails) {
                 $thumb = get_the_post_thumbnail($post->ID, 'tribe-related-posts-thumbnail');
                 if ($thumb) {
                     echo '<div class="tribe-related-posts-thumbnail"><a href="' . get_permalink($post) . '">' . $thumb . '</a></div>';
                 }
             }
             echo '<div class="tribe-related-posts-title"><a href="' . get_permalink($post) . '">' . get_the_title($post) . '</a></div>';
             if (class_exists('TribeEvents') && $post->post_type == TribeEvents::POSTTYPE && function_exists('tribe_events_event_schedule_details')) {
                 echo tribe_events_event_schedule_details($post);
             }
             echo '</li>';
             echo '<hr />';
         }
         echo '</ul>';
     }
 }
开发者ID:TyRichards,项目名称:river_of_life,代码行数:38,代码来源:tribe-related-posts.class.php

示例10: tribe_upcoming_events

function tribe_upcoming_events($atts)
{
    // Attributes
    extract(shortcode_atts(array('number' => 3, 'usecols' => true, 'cols' => 3), $atts));
    // Code
    add_filter('excerpt_length', 'tekserve_studio_excerpt_length', 999);
    $html = '<div id="tribe-events-content" class="tekserve-studio-tribe-events tribe-events-list tribe-events-photo">
		<div class="tribe-events-loop hfeed vcalendar tribe-clearfix" id="tribe-events-photo-events">';
    $args = array('post_type' => 'tribe_events', 'post_status' => 'publish', 'posts_per_page' => $number);
    $the_query = new WP_Query($args);
    // The Loop
    if ($the_query->have_posts()) {
        if ($usecols) {
            if (intval($cols) > 12) {
                $cols = intval($cols / 12);
            }
            //end if( intval( $cols ) > 12 )
            $colsize = intval(12 / $cols);
            $coltag = '[column size="' . $colsize . '" col_class="md"]';
            $i = 0;
            while ($the_query->have_posts()) {
                $post = $the_query->the_post();
                if ($i == 0) {
                    $html .= '[row]';
                }
                //end if( $i == 0 )
                $html .= $coltag;
                $html .= '<div class="tribe-events-photo-event-wrap">';
                $html .= tribe_event_featured_image(null, 'medium');
                $html .= '<div class="tribe-events-event-details tribe-clearfix">';
                $html .= print_r(do_action('tribe_events_before_the_event_title'), true);
                $html .= '<h3 class="tribe-events-list-event-title entry-title summary">';
                $html .= '<a class="url" href="' . esc_url(tribe_get_event_link()) . '" title="' . the_title('', '', false) . '" rel="bookmark">';
                $html .= the_title('', '', false);
                $html .= '</a></h3>';
                $html .= print_r(do_action('tribe_events_after_the_event_title'), true);
                $html .= print_r(do_action('tribe_events_before_the_meta'), true);
                $html .= '<div class="tribe-events-event-meta">
								<div class="updated published time-details">';
                if (!empty($post->distance)) {
                    $html .= '<strong>[' . tribe_get_distance_with_unit($post->distance) . ']</strong>';
                }
                //end if( ! empty( $post->distance ) )
                $html .= tribe_events_event_schedule_details();
                $html .= '</div>
					</div>';
                $html .= print_r(do_action('tribe_events_after_the_meta'), true);
                $html .= print_r(do_action('tribe_events_before_the_content'), true);
                $html .= '<div class="tribe-events-list-photo-description tribe-events-content entry-summary description">';
                $html .= tribe_events_get_the_excerpt();
                $html .= '</div>';
                $html .= print_r(do_action('tribe_events_after_the_content'), true);
                $html .= '	</div>
				</div>';
                $html .= '[/column]';
                if ($i == intval($cols - 1)) {
                    $html .= '[/row]';
                }
                //end if( $i == intval( $cols-1 ) )
                if ($i < $cols) {
                    $i++;
                } else {
                    $i = 0;
                }
                //end if( $i < $cols )
            }
            //end while( $the_query->have_posts() )
        } else {
            while ($the_query->have_posts()) {
                $post = $the_query->the_post();
                $html .= '<div class="tribe-events-photo-event-wrap">';
                $html .= tribe_event_featured_image(null, 'medium');
                $html .= '<div class="tribe-events-event-details tribe-clearfix">';
                $html .= print_r(do_action('tribe_events_before_the_event_title'), true);
                $html .= '<h3 class="tribe-events-list-event-title entry-title summary">';
                $html .= '<a class="url" href="' . esc_url(tribe_get_event_link()) . '" title="' . the_title('', '', false) . '" rel="bookmark">';
                $html .= the_title('', '', false);
                $html .= '</a></h3>';
                $html .= print_r(do_action('tribe_events_after_the_event_title'), true);
                $html .= print_r(do_action('tribe_events_before_the_meta'), true);
                $html .= '<div class="tribe-events-event-meta">
								<div class="updated published time-details">';
                if (!empty($post->distance)) {
                    $html .= '<strong>[' . tribe_get_distance_with_unit($post->distance) . ']</strong>';
                }
                //end if( ! empty( $post->distance ) )
                $html .= tribe_events_event_schedule_details();
                $html .= '</div>
					</div>';
                $html .= print_r(do_action('tribe_events_after_the_meta'), true);
                $html .= print_r(do_action('tribe_events_before_the_content'), true);
                $html .= '<div class="tribe-events-list-photo-description tribe-events-content entry-summary description">';
                $html .= tribe_events_get_the_excerpt();
                $html .= '</div>';
                $html .= print_r(do_action('tribe_events_after_the_content'), true);
                $html .= '	</div>
				</div>';
            }
            //end while( $the_query->have_posts() )
        }
//.........这里部分代码省略.........
开发者ID:hkbrown21,项目名称:carya-tekserve-studio-child-theme,代码行数:101,代码来源:functions.php

示例11: shortcode_events_cal

function shortcode_events_cal($atts, $content = null)
{
    extract(shortcode_atts(array('count' => '', 'columns' => '4', 'show_title' => 'yes', 'show_image' => 'yes', 'show_date' => 'yes', 'show_excerpt' => 'yes', 'text_align' => 'left', 'el_class' => ''), $atts));
    $html = '';
    $args = array('post_type' => 'tribe_events', 'posts_per_page' => $count, 'orderby' => 'menu_order', 'order' => 'DESC');
    $text_align = $text_align != 'left' ? 'event_align_' . $text_align : '';
    $events = new WP_Query($args);
    if ($events->have_posts()) {
        $html .= '<div class="event_calendar_wrap clearfix">';
        $columns = (int) $columns;
        while ($events->have_posts()) {
            $events->the_post();
            $thumb_id = get_post_thumbnail_id();
            $thumb_link = wp_get_attachment_image_src($thumb_id, 'full', true);
            $html .= '<article class="col columns-' . $columns . '">';
            if ($show_image == 'yes') {
                $html .= '<figure>';
                $html .= '<a href="' . get_the_permalink() . '" class="url" rel="bookmark">';
                $html .= '<div class="text-overlay">';
                $html .= '<div class="info"><i class="fa fa-search"></i></div>';
                $html .= '</div>';
                $html .= '<img src="' . $thumb_link[0] . '">';
                $html .= '</a>';
                $html .= '</figure>';
            }
            $html .= '<div class="description ' . $text_align . '">';
            if ($show_title == 'yes') {
                $html .= '<h2><a href="' . get_the_permalink() . '" class="url" rel="bookmark">' . get_the_title() . '</a></h2>';
            }
            if (function_exists('tribe_events_event_schedule_details')) {
                if ($show_date == 'yes') {
                    $html .= '<h4>' . tribe_events_event_schedule_details() . '</h4>';
                }
                if ($show_excerpt == 'yes') {
                    $html .= '<div class="event_excerpt">';
                    $html .= string_limit_words(get_the_excerpt(), 15) . '...';
                    $html .= '</div>';
                }
                /*
                							        if(function_exists(tribe_get_cost)){
                
                    if ( tribe_get_cost() ) : 
                        $html .= '<div class="tribe-events-event-cost">';
                            $html .= '<span>' . tribe_get_cost( null, true ) . '</span>';
                        $html .= '</div>';
                    endif;
                
                }
                */
            }
            $html .= '</div>';
            $html .= '</article>';
        }
        wp_reset_query();
        $html .= '</div>';
    }
    return $html;
}
开发者ID:AlchemyMomentum,项目名称:public_html,代码行数:58,代码来源:shortcodes.php

示例12: tribe_single_related_events

 /**
  * Echos the single events page related events boxes.
  *
  * @param mixed $tag The specific tags you want it relating to.
  * @param mixed $category The specific categories you want it relating to.
  * @param int $count The number of related events to find.
  * @return void.
  */
 function tribe_single_related_events($count = 3)
 {
     $posts = tribe_get_related_posts($count);
     if (is_array($posts) && !empty($posts)) {
         echo '<h3 class="tribe-events-related-events-title">' . __('Related Events', 'tribe-events-calendar-pro') . '</h3>';
         echo '<ul class="tribe-related-events tribe-clearfix hfeed vcalendar">';
         foreach ($posts as $post) {
             echo '<li>';
             $thumb = has_post_thumbnail($post->ID) ? get_the_post_thumbnail($post->ID, 'large') : '<img src="' . trailingslashit(TribeEventsPro::instance()->pluginUrl) . 'resources/images/tribe-related-events-placeholder.png" alt="' . get_the_title($post->ID) . '" />';
             echo '<div class="tribe-related-events-thumbnail">';
             echo '<a href="' . tribe_get_event_link($post) . '" class="url" rel="bookmark">' . $thumb . '</a>';
             echo '</div>';
             echo '<div class="tribe-related-event-info">';
             echo '<h3 class="tribe-related-events-title summary"><a href="' . tribe_get_event_link($post) . '" class="url" rel="bookmark">' . get_the_title($post->ID) . '</a></h3>';
             if ($post->post_type == TribeEvents::POSTTYPE) {
                 echo tribe_events_event_schedule_details($post);
             }
             echo '</div>';
             echo '</li>';
         }
         echo '</ul>';
     }
 }
开发者ID:donwea,项目名称:nhap.org,代码行数:31,代码来源:general.php

示例13: grve_header_title

/**
 * Prints correct title/subtitle for all cases
 */
function grve_header_title()
{
    global $post;
    $page_title = $page_description = $page_reversed = '';
    //Shop
    if (grve_woocommerce_enabled() && is_shop() && !is_search()) {
        $post_id = wc_get_page_id('shop');
        $page_title = get_the_title($post_id);
        $page_description = get_post_meta($post_id, 'grve_page_description', true);
        return array('title' => $page_title, 'description' => $page_description);
    }
    //Events Calendar Overview Pages
    if (grve_events_calendar_is_overview()) {
        return array('title' => tribe_get_events_title(true), 'description' => '');
    }
    //Main Pages
    if (is_front_page() && is_home()) {
        // Default homepage
        $page_title = get_bloginfo('name');
        $page_description = get_bloginfo('description');
    } else {
        if (is_front_page()) {
            // static homepage
            $page_title = get_bloginfo('name');
            $page_description = get_bloginfo('description');
        } else {
            if (is_home()) {
                // blog page
                $page_title = get_bloginfo('name');
                $page_description = get_bloginfo('description');
            } else {
                if (is_search()) {
                    $page_description = __('Search Results for :', GRVE_THEME_TRANSLATE);
                    $page_title = esc_attr(get_search_query());
                    $page_reversed = 'reversed';
                } else {
                    if (is_singular()) {
                        $post_id = $post->ID;
                        $post_type = get_post_type($post_id);
                        //Single Post
                        if ($post_type == 'page' && is_singular('page')) {
                            $page_title = get_the_title();
                            $page_description = get_post_meta($post_id, 'grve_page_description', true);
                        } else {
                            if ($post_type == 'portfolio' && is_singular('portfolio')) {
                                $page_title = get_the_title();
                                $page_description = get_post_meta($post_id, 'grve_portfolio_description', true);
                            } else {
                                if (grve_events_calendar_enabled() && $post_type == 'tribe_events' && is_singular('tribe_events')) {
                                    $page_title = get_the_title();
                                    $page_description = tribe_events_event_schedule_details($post_id, '', '');
                                    if (tribe_get_cost()) {
                                        $page_description .= '<span class="grve-event-cost grve-bg-primary-1">' . tribe_get_cost(null, true) . '</span>';
                                    }
                                } else {
                                    if (grve_events_calendar_enabled() && $post_type == 'tribe_organizer' && is_singular('tribe_organizer')) {
                                        $page_title = get_the_title();
                                        $page_description = grve_event_organizer_title_meta();
                                    } else {
                                        $page_title = get_the_title();
                                    }
                                }
                            }
                        }
                    } else {
                        if (is_archive()) {
                            //Post Categories
                            if (is_category()) {
                                $page_title = single_cat_title("", false);
                                $page_description = category_description();
                            } else {
                                if (is_tag()) {
                                    $page_description = __("Posts Tagged :", GRVE_THEME_TRANSLATE);
                                    $page_title = single_tag_title("", false);
                                    $page_reversed = 'reversed';
                                } else {
                                    if (is_author()) {
                                        global $author;
                                        $userdata = get_userdata($author);
                                        $page_description = __("Posts By :", GRVE_THEME_TRANSLATE);
                                        $page_title = $userdata->display_name;
                                        $page_reversed = 'reversed';
                                    } else {
                                        if (is_day()) {
                                            $page_description = __("Daily Archives :", GRVE_THEME_TRANSLATE);
                                            $page_title = get_the_time('l, F j, Y');
                                            $page_reversed = 'reversed';
                                        } else {
                                            if (is_month()) {
                                                $page_description = __("Monthly Archives :", GRVE_THEME_TRANSLATE);
                                                $page_title = get_the_time('F Y');
                                                $page_reversed = 'reversed';
                                            } else {
                                                if (is_year()) {
                                                    $page_description = __("Yearly Archives :", GRVE_THEME_TRANSLATE);
                                                    $page_title = get_the_time('Y');
                                                    $page_reversed = 'reversed';
//.........这里部分代码省略.........
开发者ID:poweronio,项目名称:mbsite,代码行数:101,代码来源:grve-header-functions.php

示例14: die

<?php

/**
 * Related Events Template
 */
if (!defined('ABSPATH')) {
    die('-1');
}
$posts = tribe_get_related_posts();
if (is_array($posts) && !empty($posts)) {
    echo '<div class="grve-related-post">';
    echo '<h5 class="grve-related-title">' . __('Related Events', GRVE_THEME_TRANSLATE) . '</h5>';
    echo '<ul>';
    foreach ($posts as $post) {
        echo '<li>';
        $thumb = has_post_thumbnail($post->ID) ? get_the_post_thumbnail($post->ID, 'grve-image-small-rect-horizontal') : '<img src="' . get_template_directory_uri() . '/images/empty/tribe-related-events-placeholder.png" alt="' . get_the_title($post->ID) . '" />';
        echo '<div class="grve-media grve-image-hover">';
        echo '<a href="' . tribe_get_event_link($post) . '" class="url" rel="bookmark">' . $thumb . '</a>';
        echo '</div>';
        echo '<div class="grve-content">';
        echo '<a href="' . tribe_get_event_link($post) . '" class="url" rel="bookmark"><h6 class="grve-title">' . get_the_title($post->ID) . '</h6></a>';
        if ($post->post_type == TribeEvents::POSTTYPE) {
            echo '<div class="grve-caption">' . tribe_events_event_schedule_details($post) . '</div>';
        }
        echo '</div>';
        echo '</li>';
    }
    echo '</ul>';
    echo '</div>';
}
开发者ID:poweronio,项目名称:mbsite,代码行数:30,代码来源:related-events.php

示例15: shortcode_handler

 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $atts = shortcode_atts(array('categories' => "", 'items' => "3", 'paginate' => "no"), $atts, $this->config['shortcode']);
     $output = "";
     $posts = $this->query_entries($atts);
     $entries = $posts->posts;
     if (!empty($entries)) {
         $output .= "<div class='av-upcoming-events " . $meta['el_class'] . "'>";
         foreach ($entries as $entry) {
             $class = "av-upcoming-event-entry";
             $image = get_the_post_thumbnail($entry->ID, 'square', array('class' => 'av-upcoming-event-image'));
             $class .= empty($image) ? " av-upcoming-event-with-image" : " av-upcoming-event-without-image";
             $title = get_the_title($entry->ID);
             $link = get_permalink($entry->ID);
             $price = tribe_get_cost($entry->ID, true);
             $venue = tribe_get_venue($entry->ID);
             $output .= "<a href='{$link}' class='{$class}'>";
             if ($image) {
                 $output .= $image;
             }
             $output .= "<div class='av-upcoming-event-data'>";
             $output .= "<h4 title='av-upcoming-event-title'>{$title}</h4>";
             $output .= "<div class='av-upcoming-event-meta'>";
             $output .= "<span class='av-upcoming-event-schedule'>" . tribe_events_event_schedule_details($entry) . "</span>";
             if ($price) {
                 $output .= "<span class='av-upcoming-event-cost'>{$price}</span>";
             }
             if ($price && $venue) {
                 $output .= " - ";
             }
             if ($venue) {
                 $output .= "<span class='av-upcoming-event-venue'>{$venue}</span>";
             }
             $output .= apply_filters('avf_upcoming_event_extra_data', "", $entry);
             $output .= "</div>";
             $output .= "</div>";
             $output .= "</a>";
         }
         if ($atts['paginate'] == "yes" && ($avia_pagination = avia_pagination($posts->max_num_pages, 'nav'))) {
             $output .= "<div class='pagination-wrap pagination-" . TribeEvents::POSTTYPE . "'>{$avia_pagination}</div>";
         }
         $output .= "</div>";
     }
     return $output;
 }
开发者ID:erynet,项目名称:SUAWEBv2,代码行数:53,代码来源:events_upcoming.php


注:本文中的tribe_events_event_schedule_details函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。