function et_postinfo_meta($postinfo, $date_format, $comment_zero, $comment_one, $comment_more) { global $themename; $postinfo_meta = ''; if (in_array('author', $postinfo)) { $postinfo_meta .= ' ' . esc_html__('by', $themename) . ' ' . et_get_the_author_posts_link(); } if (in_array('date', $postinfo)) { if (in_array('author', $postinfo)) { $postinfo_meta .= ' | '; } $postinfo_meta .= get_the_time($date_format); } if (in_array('categories', $postinfo)) { if (in_array('author', $postinfo) || in_array('date', $postinfo)) { $postinfo_meta .= ' | '; } $postinfo_meta .= get_the_category_list(', '); } if (in_array('comments', $postinfo)) { if (in_array('author', $postinfo) || in_array('date', $postinfo) || in_array('categories', $postinfo)) { $postinfo_meta .= ' | '; } $postinfo_meta .= et_get_comments_popup_link($comment_zero, $comment_one, $comment_more); } echo $postinfo_meta; }
function et_postinfo_meta($postinfo, $date_format, $comment_zero, $comment_one, $comment_more) { global $themename; $postinfo_meta = esc_html__('Posted', $themename); if (in_array('author', $postinfo) && 'project' !== get_post_type()) { $postinfo_meta .= ' ' . esc_html__('By', $themename) . ' ' . et_get_the_author_posts_link(); } if (in_array('date', $postinfo)) { $postinfo_meta .= ' ' . esc_html__('on', $themename) . ' ' . get_the_time($date_format); } if (in_array('categories', $postinfo) && 'project' !== get_post_type()) { $postinfo_meta .= ' ' . esc_html__('in', $themename) . ' ' . get_the_category_list(', '); } if (in_array('comments', $postinfo)) { $postinfo_meta .= ' | ' . et_get_comments_popup_link($comment_zero, $comment_one, $comment_more); } echo $postinfo_meta; }
<article id="post-<?php the_ID(); ?> " <?php post_class('clearfix entry entry-content'); ?> > <h1 class="title"><?php the_title(); ?> </h1> <p class="meta-info"> <?php printf(_x('Posted by %1$s in %2$s | %3$s', 'Meta information on single event page', 'Harmony'), et_get_the_author_posts_link(), get_the_term_list(get_the_ID(), 'event_category', '', ', '), et_get_comments_popup_link(__('0 comments', 'Harmony'), __('1 comment', 'Harmony'), '% ' . __('comments', 'Harmony'))); ?> </p> <?php $date_format = apply_filters('et_event_settings_date_format', 'D, M d, Y'); $default_time_format = get_option('time_format'); $et_event_startdate = get_post_meta(get_the_ID(), '_et_event_date', true); $et_event_enddate = get_post_meta(get_the_ID(), '_et_event_enddate', true); $et_event_location = get_post_meta(get_the_ID(), '_et_event_location', true); $et_event_venue = get_post_meta(get_the_ID(), '_et_event_venue', true); $et_event_price = get_post_meta(get_the_ID(), '_et_event_price', true); $et_purchase_link = get_post_meta(get_the_ID(), '_et_purchase_link', true); $event_startday = date($date_format, $et_event_startdate); $event_endday = date($date_format, $et_event_enddate); $event_starttime = date($default_time_format, $et_event_startdate);
function et_postinfo_meta($postinfo, $date_format, $comment_zero, $comment_one, $comment_more, $project = false) { global $themename; $postinfo_meta = ''; if (in_array('author', $postinfo)) { $postinfo_meta .= ' ' . esc_html__('by', $themename) . ' ' . et_get_the_author_posts_link(); } if (in_array('date', $postinfo)) { $postinfo_meta .= ' ' . esc_html__('on', $themename) . ' ' . get_the_time($date_format); } if (in_array('categories', $postinfo)) { $postinfo_meta .= ' ' . esc_html__('in', $themename) . ' ' . ($project ? get_the_term_list(get_the_ID(), 'project_category', '', ', ', '') : get_the_category_list(', ')); } if (in_array('comments', $postinfo)) { $postinfo_meta .= ' | ' . et_get_comments_popup_link($comment_zero, $comment_one, $comment_more); } if ('' != $postinfo_meta) { $postinfo_meta = __('Posted', $themename) . ' ' . $postinfo_meta; } echo $postinfo_meta; }
the_ID(); ?> " <?php post_class('clearfix entry entry-content'); ?> > <h1 class="title"><?php the_title(); ?> </h1> <p class="meta-info"> <?php $gallery_date = get_post_meta(get_the_ID(), '_et_gallery_date', true); $et_gallery_date = '' != $gallery_date ? date_i18n(et_get_option('harmony_date_format', 'M j, Y'), $gallery_date) : et_get_option('harmony_date_format', 'M j, Y'); printf(_x('Posted by %1$s in %2$s on %3$s | %4$s', 'Meta information on single gallery page', 'Harmony'), et_get_the_author_posts_link(), get_the_term_list(get_the_ID(), 'gallery_category', '', ', '), esc_html($et_gallery_date), et_get_comments_popup_link(__('0 comments', 'Harmony'), __('1 comment', 'Harmony'), '% ' . __('comments', 'Harmony'))); ?> </p> <?php $i = 0; $media = get_post_meta(get_the_ID(), '_et_used_images', true); $width = (int) apply_filters('et_gallery_image_width', 170); $height = (int) apply_filters('et_gallery_image_height', 170); if ($media) { ?> <div id="et-gallery-images" class="clearfix"> <?php foreach ((array) $media as $et_media) { $i++; if (is_numeric($et_media)) {