function et_pb_postinfo_meta($postinfo, $date_format, $comment_zero, $comment_one, $comment_more) { $postinfo_meta = ''; if (in_array('author', $postinfo)) { $postinfo_meta .= ' ' . esc_html__('by', 'et_builder') . ' ' . et_pb_get_the_author_posts_link(); } if (in_array('date', $postinfo)) { if (in_array('author', $postinfo)) { $postinfo_meta .= ' | '; } $postinfo_meta .= get_the_time(wp_unslash($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_pb_get_comments_popup_link($comment_zero, $comment_one, $comment_more); } return $postinfo_meta; }
function et_pb_postinfo_meta($postinfo, $date_format, $comment_zero, $comment_one, $comment_more) { $postinfo_meta = ''; if (in_array('author', $postinfo)) { $postinfo_meta .= ' ' . esc_html__('by', 'et_builder') . ' <span class="author vcard">' . et_pb_get_the_author_posts_link() . '</span>'; } if (in_array('date', $postinfo)) { if (in_array('author', $postinfo)) { $postinfo_meta .= ' | '; } $postinfo_meta .= '<span class="published">' . esc_html(get_the_time(wp_unslash($date_format))) . '</span>'; } if (in_array('categories', $postinfo)) { $categories_list = get_the_category_list(', '); // do not output anything if no categories retrieved if ('' !== $categories_list) { if (in_array('author', $postinfo) || in_array('date', $postinfo)) { $postinfo_meta .= ' | '; } $postinfo_meta .= $categories_list; } } if (in_array('comments', $postinfo)) { if (in_array('author', $postinfo) || in_array('date', $postinfo) || in_array('categories', $postinfo)) { $postinfo_meta .= ' | '; } $postinfo_meta .= et_pb_get_comments_popup_link($comment_zero, $comment_one, $comment_more); } return $postinfo_meta; }