function gd_post_meta() { $output = '<div class="entry-meta">'; //~ 字体设置按钮 if (is_single() || is_page()) { $output .= apply_filters('dmeng_post_meta_set_font', '<div class="entry-set-font"><span id="set-font-small" class="disabled">A<sup>-</sup></span><span id="set-font-big">A<sup>+</sup></span></div>'); } // $output .= apply_filters('dmeng_post_meta_author', '<span class="glyphicon glyphicon-user"></span><a href="'.esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ).'" itemprop="author">'.get_the_author().'</a>'); $output .= apply_filters('dmeng_post_meta_date', '<span class="glyphicon glyphicon-calendar"></span><time class="entry-date" title="' . sprintf(__('发布于 %1$s 最后编辑于 %2$s ', 'dmeng'), get_the_time('Y-m-d H:i:s'), get_the_modified_time('Y-m-d H:i:s')) . '" datetime="' . get_the_date('c') . '" itemprop="datePublished">' . get_the_date() . '</time>'); // $output .= apply_filters('dmeng_post_meta_comments_number', '<span class="glyphicon glyphicon-comment"></span><a href="'.get_permalink().'#comments" itemprop="discussionUrl" itemscope itemtype="http://schema.org/Comment"><span itemprop="interactionCount">'.get_comments_number().'</span></a>'); $traffic = get_dmeng_traffic('single', get_the_ID()); $output .= apply_filters('dmeng_post_meta_traffic', '<span class="glyphicon glyphicon-eye-open"></span>' . sprintf(__('%s 次浏览', 'dmeng'), is_singular() ? '<span data-num-views="true">' . $traffic . '</span>' : $traffic)); //~ 如果是文章页则输出分类和标签,因为只有文章才有~ if (get_post_type() == 'post') { if (apply_filters('dmeng_post_meta_cat_show', true)) { $categories = get_the_category(); if ($categories) { foreach ($categories as $category) { $cats[] = '<a href="' . get_category_link($category->term_id) . '" rel="category" itemprop="articleSection">' . $category->name . '</a>'; } $output .= apply_filters('dmeng_post_meta_cat', '<span class="glyphicon glyphicon-folder-open"></span>' . join(' | ', $cats)); } } if (apply_filters('dmeng_post_meta_tag_show', true)) { $tags = get_the_tag_list('<span class="glyphicon glyphicon-tags"></span>', ' | '); if ($tags) { $output .= apply_filters('dmeng_post_meta_tag', '<span itemprop="keywords">' . $tags . '</span>'); } } } $output .= '</div>'; echo $output; }
/** * Display the post meta * @since 1.0.0 */ function storefront_post_meta() { ?> <aside class="entry-meta"> <?php if ('post' == get_post_type()) { // Hide category and tag text for pages on Search ?> <?php /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(__(', ', 'storefront')); if ($categories_list && storefront_categorized_blog()) { ?> <span class="cat-links"> <?php echo '<span class="screen-reader-text">' . esc_attr(__('Categories: ', 'storefront')) . '</span>'; echo wp_kses_post($categories_list); ?> </span> <?php } // End if categories ?> <?php /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', __(', ', 'storefront')); if ($tags_list) { ?> <span class="tags-links"> <?php echo '<span class="screen-reader-text">' . esc_attr(__('Tags: ', 'storefront')) . '</span>'; echo wp_kses_post($tags_list); ?> </span> <?php } // End if $tags_list ?> <?php } // End if 'post' == get_post_type() ?> <!-- <?php if (!post_password_required() && (comments_open() || '0' != get_comments_number())) { ?> <span class="comments-link"><?php comments_popup_link(__('Leave a comment', 'storefront'), __('1 Comment', 'storefront'), __('% Comments', 'storefront')); ?> </span> <?php } ?> --> </aside> <?php }
/** * Displays meta information for a post * @return void */ function appletree_post_meta() { if (get_post_type() == 'post') { echo sprintf(__('Posted %s in %s%s by %s. ', 'appletreesg.com'), get_the_time(get_option('date_format')), get_the_category_list(', '), get_the_tag_list(__(', <b>Tags</b>: ', 'appletreesg.com'), ', '), get_the_author_link()); } edit_post_link(__(' (edit)', 'appletreesg.com'), '<span class="edit-link">', '</span>'); }
/** * Prints HTML with meta information for the current post-date/time and author. */ function impronta_metadata() { // Hide category and tag text for pages. if ('post' === get_post_type()) { echo '<p class="metadata">'; $byline = sprintf(esc_html_x('By %s', 'post author', 'impronta'), '<span class="author vcard"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . esc_html(get_the_author()) . '</a></span> '); echo $byline; /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(esc_html__(', ', 'impronta')); if ($categories_list && impronta_categorized_blog()) { printf('<span class="cat-links">' . esc_html_x('on %1$s ', 'on categories', 'impronta') . '</span>', $categories_list); // WPCS: XSS OK. } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', esc_html__(', ', 'impronta')); if ($tags_list) { printf(esc_html__('tagged %1$s', 'impronta'), $tags_list); // WPCS: XSS OK. } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { if (get_comments_number(get_the_id()) == 0) { echo esc_html__('- ', 'impronta'); } else { echo esc_html__('with ', 'impronta'); } comments_popup_link(esc_html__('Leave a comment', 'impronta'), esc_html__('1 Comment', 'impronta'), esc_html__('% Comments', 'impronta')); } if (is_sticky()) { echo ' - ' . '<i class="feature-star fa fa-star" data-toggle="tooltip" data-placement="right" title="' . esc_attr__('Featured Post', 'impronta') . '"></i>'; } echo '</p>'; } }
/** * This is a duplicate of the above. Probably delete others */ function kanec_entry_meta() { // Time $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; if (get_the_time('U') !== get_the_modified_time('U')) { $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>'; } $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date())); echo '<div class="posted-on"><i class="icon icon-calendar-o"></i><a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a></div>'; // Author echo '<div class="byline"><i class="icon icon-user"></i><span class="author vcard"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . esc_html(get_the_author()) . '</a></span></div>'; // Categories & Tags // Hide category and tag text for pages. if ('post' === get_post_type()) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(esc_html__(', ', 'kanec')); if ($categories_list && kanec_categorized_blog()) { echo '<div class="cat-links"><i class="icon icon-folder-open"></i>' . $categories_list . '</div>'; } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', esc_html__(', ', 'kanec')); if ($tags_list) { echo '<div class="tags-links"><i class="icon icon-tags"></i>' . $tags_list . '</div>'; } } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<div class="comments-link"><i class="icon icon-comments"></i>'; comments_popup_link(esc_html__('Leave a comment', 'kanec'), esc_html__('1 Comment', 'kanec'), esc_html__('% Comments', 'kanec')); echo '</div>'; } }
/** * Prints HTML with meta information for current post: categories, tags, permalink, author, and date. * * @return void */ function wheels_entry_meta() { if (is_sticky() && is_home() && !is_paged()) { echo '<span class="featured-post">' . __('Sticky', 'wheels') . '</span>'; } if (!has_post_format('link') && 'post' == get_post_type()) { wheels_entry_date(); } // Translators: used between list items, there is a space after the comma. $categories_list = get_the_category_list(__(', ', 'wheels')); if ($categories_list) { echo '/<span class="categories-links">' . $categories_list . '</span>'; } // Translators: used between list items, there is a space after the comma. $tag_list = get_the_tag_list('', __(', ', 'wheels')); if ($tag_list) { echo '/<span class="tags-links">' . $tag_list . '</span>'; } // Post author if ('post' == get_post_type()) { printf('/<span class="author vcard">%1$s <a class="url fn n" href="%2$s" title="%3$s" rel="author">%4$s</a></span>', __('by', 'wheels'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', 'wheels'), get_the_author())), get_the_author()); $num_comments = get_comments_number(); // get_comments_number returns only a numeric value if ($num_comments == 0) { } else { if ($num_comments > 1) { $comments = $num_comments . __(' Comments', 'wheels'); } else { $comments = __('1 Comment', 'wheels'); } echo $write_comments = '/<span class="comments-count"><a href="' . get_comments_link() . '">' . $comments . '</a></span>'; } } }
function smart_entry_tag($pretag = "", $endtag = "") { $tags_list = get_the_tag_list('', ', '); if ($tags_list) { printf($pretag . '%1$s' . $endtag, $tags_list); } }
function directory_theme_entry_meta() { if (is_sticky() && is_home() && !is_paged()) { printf('<span class="sticky-post">%s</span>', __('Featured', 'directory-starter')); } $format = get_post_format(); if (current_theme_supports('post-formats', $format)) { printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'directory-starter')), esc_url(get_post_format_link($format)), get_post_format_string($format)); } if (in_array(get_post_type(), array('post', 'attachment'))) { $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; $time_string = sprintf($time_string, esc_attr(get_the_date('c')), get_the_date(), esc_attr(get_the_modified_date('c')), get_the_modified_date()); printf('<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>', _x('Posted on', 'Used before publish date.', 'directory-starter'), esc_url(get_permalink()), $time_string); } if ('post' == get_post_type()) { if (is_singular() || is_multi_author()) { printf('<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>', _x('Author', 'Used before post author name.', 'directory-starter'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author()); } $categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'directory-starter')); if ($categories_list) { printf('<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Categories', 'Used before category names.', 'directory-starter'), $categories_list); } $tags_list = get_the_tag_list('', _x(', ', 'Used between list items, there is a space after the comma.', 'directory-starter')); if ($tags_list) { printf('<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Tags', 'Used before tag names.', 'directory-starter'), $tags_list); } } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<span class="comments-link">'; comments_popup_link(__('Leave a comment', 'directory-starter'), __('1 Comment', 'directory-starter'), __('% Comments', 'directory-starter')); echo '</span>'; } }
/** * Prints HTML with meta information for the current post-date/time and author. */ function bemmy_posted_on() { $byline = sprintf(esc_html_x('%s', 'post author', 'bemmy'), '<span class="author vcard"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . esc_html(get_the_author()) . '</a></span>'); $posted_in = ''; // Hide category and tag text for pages. if ('post' === get_post_type()) { /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', esc_html__(', ', 'bemmy')); if ($tags_list) { $posted_in .= sprintf(' on <span class="tags-links">' . esc_html__(' %1$s', 'bemmy') . '</span>', $tags_list); // WPCS: XSS OK. } /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(esc_html__(', ', 'bemmy')); if ($categories_list && bemmy_categorized_blog()) { $posted_in .= sprintf(' <span class="cat-links">' . esc_html__(' in %1$s', 'bemmy') . '</span>', $categories_list); // WPCS: XSS OK. } } echo '<span class="artcile__meta-byline"> ' . $byline . '</span><span class="article__meta-in">' . $posted_in . '</span>'; // WPCS: XSS OK. $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; if (get_the_time('U') !== get_the_modified_time('U')) { $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>'; } $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date())); $posted_on = sprintf('<span class="sep"> | </span>' . esc_html_x(' %s', 'post date', 'bemmy'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>'); echo $posted_on; }
/** * Prints HTML with meta information for the categories, tags and comments. */ function material_blog_entry_footer() { // Hide category and tag text for pages. if ('post' === get_post_type()) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(esc_html__(', ', 'material-blog')); if ($categories_list && material_blog_categorized_blog()) { printf('<span class="cat-links">' . esc_html__('%1$s', 'material-blog') . '</span>', $categories_list); // WPCS: XSS OK. } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', esc_html__(', ', 'material-blog')); if ($tags_list) { printf('<span class="tags-links">' . esc_html__('%1$s', 'material-blog') . '</span>', $tags_list); // WPCS: XSS OK. } } /* if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo '<span class="comments-link">'; comments_popup_link( esc_html__( 'Leave a comment', 'material-blog' ), esc_html__( '1 Comment', 'material-blog' ), esc_html__( '% Comments', 'material-blog' ) ); echo '</span>'; }*/ // the function used in the header part, this part copied out to the footer separately edit_post_link(sprintf(esc_html__('Edit %s', 'material-blog'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>'); }
/** * Prints HTML with meta information for the categories, tags and comments. */ function jinn_entry_footer() { global $post; // Hide category and tag text for pages. if ('post' === get_post_type() || 'jetpack-portfolio' === get_post_type()) { /* translators: used between list items, there is a space after the comma */ if ('post' === get_post_type()) { $categories_list = get_the_category_list(esc_html__(', ', 'jinn')); } elseif ('jetpack-portfolio' === get_post_type()) { $categories_list = get_the_term_list($post->ID, 'jetpack-portfolio-type', '', esc_html_x(', ', 'Used between list items, there is a space after the comma.', 'jinn'), ''); } if ($categories_list && jinn_categorized_blog()) { printf('<span class="cat-links">' . $categories_list . '</span>', $categories_list); // WPCS: XSS OK. } /* translators: used between list items, there is a space after the comma */ if ('post' === get_post_type()) { $tags_list = get_the_tag_list('<li class="label radius">', '</li><li class="label radius">', '</li>'); } elseif ('jetpack-portfolio' === get_post_type()) { $tags_list = get_the_term_list($post->ID, 'jetpack-portfolio-tag', '<li class="label radius">', '</li><li class="label radius">', '</li>'); } if ($tags_list) { echo '<ul class="tags-links">' . $tags_list . '</ul>'; // WPCS: XSS OK. } } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<span class="comments-link">'; comments_popup_link(esc_html__('Leave a comment', 'jinn'), esc_html__('1 Comment', 'jinn'), esc_html__('% Comments', 'jinn')); echo '</span>'; } }
/** * Prints HTML with meta information for the categories, tags and comments. */ function twentyseventeen_entry_footer() { /* translators: used between list items, there is a space after the comma */ $separate_meta = __(', ', 'twentyseventeen'); // Get Categories for posts. $categories_list = get_the_category_list($separate_meta); // Get Tags for posts. $tags_list = get_the_tag_list('', $separate_meta); // We don't want to output .entry-footer if it will be empty, so make sure its not. if (twentyseventeen_categorized_blog() && $categories_list || $tags_list || get_edit_post_link()) { echo '<footer class="entry-footer">'; if ('post' === get_post_type()) { if ($categories_list && twentyseventeen_categorized_blog() || $tags_list) { echo '<span class="cat-tags-links">'; // Make sure there's more than one category before displaying. if ($categories_list && twentyseventeen_categorized_blog()) { echo '<span class="cat-links">' . twentyseventeen_get_svg(array('icon' => 'folder-open')) . '<span class="screen-reader-text">' . __('Categories', 'twentyseventeen') . '</span>' . $categories_list . '</span>'; } if ($tags_list) { echo '<span class="tags-links">' . twentyseventeen_get_svg(array('icon' => 'hashtag')) . '<span class="screen-reader-text">' . __('Tags', 'twentyseventeen') . '</span>' . $tags_list . '</span>'; } echo '</span>'; } } twentyseventeen_edit_link(); echo '</footer> <!-- .entry-footer -->'; } }
/** * Prints HTML with meta information for the categories, tags and comments. */ function sangeet_entry_footer() { // Hide category and tag text for pages. if ('post' === get_post_type()) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(esc_html__(', ', 'sangeet')); if ($categories_list && sangeet_categorized_blog()) { printf('<span class="cat-links">' . esc_html__('%1$s', 'sangeet') . '</span>', $categories_list); // WPCS: XSS OK. } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', esc_html__(', ', 'sangeet')); if ($tags_list) { printf('<span class="tags-links">' . esc_html__('%1$s', 'sangeet') . '</span>', $tags_list); // WPCS: XSS OK. } } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<span class="comments-link">'; comments_popup_link(esc_html__('Leave a comment', 'sangeet'), esc_html__('1 Comment', 'sangeet'), esc_html__('% Comments', 'sangeet')); echo '</span>'; } edit_post_link(sprintf(esc_html__('Edit %s', 'sangeet'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>'); if (!is_single()) { echo '<span class="continue-reading"><a href="' . get_permalink() . '" title="' . esc_html__('Continue Reading ', 'sangeet') . get_the_title() . '" rel="bookmark">' . esc_html__('Continue Reading ', 'sangeet') . '</a></span>'; } }
/** * Prints HTML with meta information for the categories, tags and comments. */ function chroma_entry_footer() { // Hide category and tag text for pages. echo '<footer class="entry-footer">'; if ('post' === get_post_type()) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(esc_html__(', ', 'chroma')); if ($categories_list && chroma_categorized_blog()) { printf('<span class="cat-links"><i title="Categories..." class="fa fa-archive"></i>' . esc_html__(' %1$s', 'chroma') . '</span> ', $categories_list); // WPCS: XSS OK. } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', esc_html__(', ', 'chroma')); if ($tags_list) { printf('<span class="tags-links"><i title="Tags..." class="fa fa-hashtag"></i>' . esc_html__(' %1$s', 'chroma') . '</span> ', $tags_list); // WPCS: XSS OK. } } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<span class="comments-link"><i title="Comments..." class="fa fa-commenting"></i> '; comments_popup_link(esc_html__('Comment', 'chroma'), esc_html__('1 Comment', 'chroma'), esc_html__('% Comments', 'chroma')); echo '</span>'; } /* edit_post_link( sprintf( esc_html__( 'Edit %s', 'chroma' ), the_title( '<span class="screen-reader-text">"', '"</span>', false ) ), '<span class="edit-link">', '</span>' ); */ echo '</footer><!-- .entry-footer -->'; }
/** * Prints HTML with meta information for the categories, tags and comments. */ function lyndascore_entry_footer() { // Hide category and tag text for pages. // if ( 'post' === get_post_type() ) { // /* translators: used between list items, list is comma separated */ // $categories_list = get_the_category_list( esc_html__( ', ', 'lyndascore' ) ); // if ( $categories_list && lyndascore_categorized_blog() ) { // printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', 'lyndascore' ) . '</span>', $categories_list ); // WPCS: XSS OK. // } // // /* translators: used between list items, there is a space after the comma */ // $tags_list = get_the_tag_list( '', esc_html__( ', ', 'lyndascore' ) ); // if ( $tags_list ) { // printf( '<span class="tags-links">' . esc_html__( 'Tagged %1$s', 'lyndascore' ) . '</span>', $tags_list ); // WPCS: XSS OK. // } // } // // if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { // echo '<span class="comments-link">'; // comments_popup_link( esc_html__( 'Leave a comment', 'lyndascore' ), esc_html__( '1 Comment', 'lyndascore' ), esc_html__( '% Comments', 'lyndascore' ) ); // echo '</span>'; // } $tags_list = get_the_tag_list('<li><i class="fa fa-tag"></i>', __('</li><li><i class="fa fa-tag"></i>', 'lyndascore')); if ($tags_list) { printf('<ul>' . __('%1$s', 'lyndascore') . '</li></ul>', $tags_list); } edit_post_link(esc_html__('Edit', 'lyndascore'), '<span class="edit-link">', '</span>'); }
function twentyten_posted_in() { // Retrieves tag list of current post, separated by commas. $tag_list = get_the_tag_list('', ', '); $temp_tag_array = explode(', ', $tag_list); $buf_tag_list = array(); foreach ($temp_tag_array as $temp_tag) { if (strpos($temp_tag, "html") > 0) { $buf_tag_list[] = '<div class="html">' . $temp_tag . '</div>'; } elseif (strpos($temp_tag, "css") > 0) { $buf_tag_list[] = '<div class="css">' . $temp_tag . '</div>'; } elseif (strpos($temp_tag, "jquery") > 0) { $buf_tag_list[] = '<div class="jquery">' . $temp_tag . '</div>'; } elseif (strpos($temp_tag, "Javascript") > 0) { $buf_tag_list[] = '<div class="Javascript">' . $temp_tag . '</div>'; } elseif (strpos($temp_tag, "wordpress") > 0) { $buf_tag_list[] = '<div class="wordpress">' . $temp_tag . '</div>'; } else { $buf_tag_list[] = $temp_tag; } } $tag_list = implode(', ', $buf_tag_list); if ($tag_list) { $posted_in = __('This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten'); } elseif (is_object_in_taxonomy(get_post_type(), 'category')) { $posted_in = __('This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten'); } else { $posted_in = __('Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten'); } // Prints the string, replacing the placeholders. printf($posted_in, get_the_category_list(', '), $tag_list, get_permalink(), the_title_attribute('echo=0')); }
function tokopress_entry_meta() { // Translators: used between list items, there is a space after the comma. $categories_list = get_the_category_list(__(', ', 'tokopress')); // Translators: used between list items, there is a space after the comma. $tag_list = get_the_tag_list('', __(', ', 'tokopress')); $date = sprintf('<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a>', esc_url(get_permalink()), esc_attr(get_the_time()), esc_attr(get_the_date('c')), esc_html(get_the_date())); $author = sprintf('<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>', esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', 'tokopress'), get_the_author())), get_the_author()); // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name. if (is_singular()) { if ($tag_list) { $utility_text = __('<span class="post-date">%3$s</span><span class="post-categories">%1$s</span><span class="post-tags">%2$s</span><span class="post-author"> by %4$s</span>', 'tokopress'); } elseif ($categories_list) { $utility_text = __('<span class="post-date">%3$s</span><span class="post-categories">%1$s</span><span class="post-author"> by %4$s</span>', 'tokopress'); } else { $utility_text = __('<span class="post-date">%3$s</span><span class="post-author"> by %4$s</span>', 'tokopress'); } } else { if ($categories_list) { $utility_text = __('<span class="post-date">%3$s</span><span class="post-categories">%1$s</span><span class="post-author"> by %4$s</span>', 'tokopress'); } else { $utility_text = __('<span class="post-date">%3$s</span><span class="by-author"> by %4$s</span>', 'tokopress'); } } printf($utility_text, $categories_list, $tag_list, $date, $author); }
function blogolife_entry_taxonomies_tags() { $tags_list = get_the_tag_list('', _x(', ', 'Used between list items, there is a space after the comma.', 'blogolife')); if ($tags_list) { printf('<div class="tags-links taxonomies-links"><b class="screen-reader-text">%1$s </b>%2$s</div>', _x('Tags:', 'Used before tag names.', 'blogolife'), $tags_list); } }
/** * Prints HTML with meta information for the categories, tags and comments. */ function _loa_entry_footer() { // Hide category and tag text for pages. if ('post' === get_post_type()) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(esc_html__(', ', '_loa')); if ($categories_list && _loa_categorized_blog()) { printf('<span class="cat-links">' . esc_html__('Posted in %1$s', '_loa') . '</span>', $categories_list); // WPCS: XSS OK. } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', esc_html__(', ', '_loa')); if ($tags_list) { printf('<span class="tags-links">' . esc_html__(', %1$s', '_loa') . '</span>', $tags_list); // WPCS: XSS OK. } } // // // // UNCOMMENT THIS FOR "Leave A Comment" IN ENTRY FOOTER // // // // // // if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { // echo '<span class="comments-link">'; // comments_popup_link( esc_html__( 'Leave a comment', '_loa' ), esc_html__( '1 Comment', '_loa' ), esc_html__( '% Comments', '_loa' ) ); // echo '</span>'; // } edit_post_link(sprintf(esc_html__('Edit %s', '_loa'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>'); }
/** * Prints HTML with meta information for the categories, tags and comments. */ function hacker_entry_footer() { // Hide category and tag text for pages. ?> <div class="Article__meta pull-left"> <?php if ('post' === get_post_type()) { echo get_the_tag_list('<span class="post-tags"><i class="icon-tags"></i>', '', '</span>'); } ?> </div> <!-- END .pull-left --> <div class="Article__meta pull-right"> <?php $post_id = get_the_ID(); $likes = get_post_meta($post_id, '_likes', true); $likes = absint($likes); printf('<span><a href="#" class="js-rating" data-post="%1$s"><i class="icon-heart"></i><span class="js-count">%2$s</span></a></span>', $post_id, $likes); if (!post_password_required() && (comments_open() || get_comments_number())) { echo '<span><i class="icon-comments"></i><span>'; comments_popup_link(esc_html__('No Comment', 'hacker'), esc_html__('1 Comment', 'hacker'), esc_html__('% Comments', 'hacker')); echo '</span></span>'; } ?> </div> <!-- END .pull-right --> <?php }
/** * Prints HTML with meta information for the categories, tags and comments. */ function tm_vals_blog_entry_footer() { // Hide category and tag text for pages. if ('post' === get_post_type()) { /* translators: used between list items, there is a space after the comma */ /*$categories_list = get_the_category_list( esc_html__( ', ', 'tm-vals-blog' ) ); if ( $categories_list && tm_vals_blog_categorized_blog() ) { printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', 'tm-vals-blog' ) . '</span>', $categories_list ); // WPCS: XSS OK. }*/ if (!is_single()) { printf('<a href="' . esc_url(get_permalink()) . '" class="article-more">' . __('More', 'tm-vals-blog') . '</a>'); } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', esc_html__(' ', 'tm-vals-blog')); if ($tags_list) { printf('<span class="tags-links">' . esc_html__('%1$s', 'tm-vals-blog') . '</span>', $tags_list); // WPCS: XSS OK. } } /*comments in footer if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo '<span class="comments-link">'; comments_popup_link( esc_html__( 'Leave a comment', 'tm-vals-blog' ), esc_html__( '1 Comment', 'tm-vals-blog' ), esc_html__( '% Comments', 'tm-vals-blog' ) ); echo '</span>'; }*/ edit_post_link(sprintf(esc_html__('Edit %s', 'tm-vals-blog'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>'); }
function slider($queried_posts) { global $post; ?> <section class="l-clear js-flickity m-flickity" data-flickity-options='{ "cellAlign": "left", "contain": true, "prevNextButtons": false, "wrapAround": true, "autoPlay": true}'> <?php foreach ($queried_posts as $post) { setup_postdata($post); echo '<a class="gallery-cell m-prf ratio-4-3 overlay" href="' . get_the_permalink() . '" title="' . get_the_title() . '">'; if (function_exists('makeitSrcset') && has_post_thumbnail()) { makeitSrcset(get_post_thumbnail_id($post->ID), 83, 62, 39, 34, 28); } echo '<h3 class="a-medium a-prf-text">' . get_the_title(); echo '<br/>'; echo '<span class="a-prf-text__span">'; echo get_the_time('Y-m-d'); if (has_tag()) { echo strip_tags(get_the_tag_list(' · ', ' · ', '')); } echo '</span>'; echo '</h3>'; echo '</a>'; } ?> </section> <?php wp_reset_postdata(); }
/** * Prints HTML with meta information for the categories, tags and comments. */ function listable_entry_footer() { // Hide category and tag text for pages. if ('post' === get_post_type()) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(esc_html__(', ', 'listable')); if ($categories_list && listable_categorized_blog()) { printf('<span class="cat-links">' . esc_html__('Posted in %1$s', 'listable') . '</span>', $categories_list); // WPCS: XSS OK. } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', esc_html__(', ', 'listable')); if ($tags_list) { printf('<span class="tags-links">' . esc_html__('Tagged %1$s', 'listable') . '</span>', $tags_list); // WPCS: XSS OK. } } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<span class="comments-link">'; comments_popup_link(esc_html__('Leave a comment', 'listable'), esc_html__('1 Comment', 'listable'), esc_html__('% Comments', 'listable')); echo '</span>'; } // // edit_post_link( // sprintf( // /* translators: %s: Name of current post */ // esc_html__( 'Edit %s', 'listable' ), // the_title( '<span class="screen-reader-text">"', '"</span>', false ) // ), // '<span class="edit-link">', // '</span>' // ); }
/** * Prints HTML with meta information for the categories, tags and comments. */ function moderna_tag_comment() { // Hide category and tag text for pages. if ('post' === get_post_type()) { /* translators: used between list items, there is a space after the comma */ /* $categories_list = get_the_category_list(esc_html__(', ', 'moderna')); if ($categories_list && moderna_categorized_blog()) { printf('<span class="cat-links">' . esc_html__('Posted in %1$s', 'moderna') . '</span>', $categories_list); // WPCS: XSS OK. }*/ /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', '<div style="float: left;">, </div>'); printf('<li><i class="icon-folder-open"></i>' . esc_html__('%1$s', 'moderna') . '</li>', $tags_list); // WPCS: XSS OK. } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<li><i class="icon-comments"></i>'; comments_popup_link(esc_html__('No comments', 'moderna'), esc_html__('1 Comment', 'moderna'), esc_html__('% Comments', 'moderna')); echo '</li>'; } /* edit_post_link( sprintf( // translators: %s: Name of current post esc_html__('Edit %s', 'moderna'), the_title('<span class="screen-reader-text">"', '"</span>', false) ), '<span class="edit-link">', '</span>' );*/ }
function kotha_post_tag_list() { $tags_list = get_the_tag_list('', __(', ', 'kotha')); if ($tags_list) { printf('<span class="tags-links">' . __('Tagged %1$s', 'kotha') . '</span>', $tags_list); } }
/** * Prints HTML with meta information for the categories, tags. * * @since Cyanotype 1.0 */ function cyanotype_entry_meta() { if ('post' == get_post_type()) { $categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'cyanotype')); if ($categories_list && cyanotype_categorized_blog()) { printf('<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Categories', 'Used before category names.', 'cyanotype'), $categories_list); } $tags_list = get_the_tag_list('', _x(', ', 'Used between list items, there is a space after the comma.', 'cyanotype')); if ($tags_list) { printf('<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Tags', 'Used before tag names.', 'cyanotype'), $tags_list); } } if ('jetpack-portfolio' == get_post_type()) { $project_types_list = get_the_term_list($post->ID, 'jetpack-portfolio-type', '', _x(', ', 'Used between list items, there is a space after the comma.', 'cyanotype'), ''); if ($project_types_list) { printf('<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Project Types', 'Used before project type names.', 'cyanotype'), $project_types_list); } $project_tag_list = get_the_term_list($post->ID, 'jetpack-portfolio-tag', '', _x(', ', 'Used between list items, there is a space after the comma.', 'cyanotype'), ''); if ($project_tag_list) { printf('<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Project Tags', 'Used before project tag names.', 'cyanotype'), $project_tag_list); } } if (is_attachment() && wp_attachment_is_image()) { // Retrieve attachment metadata. $metadata = wp_get_attachment_metadata(); printf('<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s × %4$s</a></span>', _x('Full size', 'Used before full size attachment link.', 'cyanotype'), esc_url(wp_get_attachment_url()), $metadata['width'], $metadata['height']); } if (!post_password_required() && (comments_open() || get_comments_number())) { echo '<span class="comments-link">'; comments_popup_link(__('Leave a comment', 'cyanotype'), __('1 Comment', 'cyanotype'), __('% Comments', 'cyanotype')); echo '</span>'; } }
function fulgent_entry_meta() { $fulgent_category_list = get_the_category_list(', ', ' '); $fulgent_tag_list = get_the_tag_list('<li>' . __('Tags : ', 'fulgent'), ', ', ' ' . '</li>'); $fulgent_date = sprintf('<time datetime="%1$s">%2$s</time>', esc_attr(get_the_date('c')), esc_html(get_the_date())); $fulgent_author = sprintf('<a href="%1$s" title="%2$s" >%3$s</a>', esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', 'fulgent'), get_the_author())), get_the_author()); if ($fulgent_tag_list) { $fulgent_utility_text = '<div class="post-meta"><ul> <li> ' . __('by', 'fulgent') . ' : %4$s </li> <li>' . __('Posted in', 'fulgent') . ' : %1$s </li> %2$s <li> ' . fulgent_comment_number_custom() . '</li> </ul> </div>'; } elseif ($fulgent_category_list) { $fulgent_utility_text = '<div class="post-meta"><ul> <li>' . __('by', 'fulgent') . ' : %4$s</li> <li>' . __('Posted in', 'fulgent') . ' : %1$s </li> %2$s <li>' . fulgent_comment_number_custom() . '</li> </ul> </div>'; } else { $fulgent_utility_text = '<div class="post-meta"><ul> <li>' . __('by', 'fulgent') . ' : %4$s </li> <li>' . __('Posted on', 'fulgent') . ' : %3$s </li> %2$s <li>' . fulgent_comment_number_custom() . '</li> </ul> </div>'; } printf($fulgent_utility_text, $fulgent_category_list, $fulgent_tag_list, $fulgent_date, $fulgent_author); }
/** * Prints HTML with meta information for the categories, tags and comments. */ function ving_entry_footer() { global $wp_query; // Hide category and tag text for pages. if ('post' === get_post_type()) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(esc_html__(', ', 'ving')); if ($categories_list && ving_categorized_blog()) { $post = $wp_query->post; $cat = wp_get_post_terms($post->ID, 'category'); $count = count($cat); if ($count > 1) { printf('<span class="cat-links col-lg-6 col-md-6 col-sm-6 col-xs-12"><span class="text">CATEGORIES</span>' . esc_html__('%1$s', 'ving') . '</span>', $categories_list); // WPCS: XSS OK. } else { printf('<span class="cat-links col-lg-6 col-md-6 col-sm-6 col-xs-12"><span class="text">CATEGORY</span>' . esc_html__('%1$s', 'ving') . '</span>', $categories_list); // WPCS: XSS OK. } } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', esc_html__(', ', 'ving')); if ($tags_list) { printf('<span class="tags-links col-lg-5 col-md-5 col-sm-5 col-xs-12"><span class="text">TAGS</span>' . esc_html__('%1$s', 'ving') . '</span>', $tags_list); // WPCS: XSS OK. } } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<span class="comments-link">'; comments_popup_link(esc_html__('Leave a comment', 'ving'), esc_html__('1 Comment', 'ving'), esc_html__('% Comments', 'ving')); echo '</span>'; } edit_post_link(sprintf(esc_html__('Edit %s', 'ving'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>'); }
/** * Prints HTML with meta information for the current post-date/time and author. */ function ocin_lite_metadata() { echo '<ul>'; $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; if (get_the_time('U') !== get_the_modified_time('U')) { $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>'; } $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date())); echo '<li class="meta_date">' . $time_string . '</li>'; $byline = sprintf(esc_html_x('by %s', 'post author', 'ocin-lite'), '<span class="author vcard"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . esc_html(get_the_author()) . '</a></span>'); echo '<li class="meta_comments">' . $byline . '</li>'; if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<li class="meta_date"><span class="comments-link">'; comments_popup_link(esc_html__('Leave a comment', 'ocin-lite'), esc_html__('1 Comment', 'ocin-lite'), esc_html__('% Comments', 'ocin-lite')); echo '</span></li>'; } // Hide category and tag text for pages. if ('post' === get_post_type() && is_single()) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(esc_html__(', ', 'ocin-lite')); if ($categories_list && ocin_lite_categorized_blog()) { printf('<li class="meta_categories"><span class="cat-links">' . esc_html__('Posted in %1$s', 'ocin-lite') . '</span></li>', $categories_list); // WPCS: XSS OK. } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', esc_html__(', ', 'ocin-lite')); if ($tags_list) { printf('<li class="meta_tags"><span class="tags-links">' . esc_html__('Tagged %1$s', 'ocin-lite') . '</span></li>', $tags_list); // WPCS: XSS OK. } } echo '</ul>'; }
/** * Prints HTML with meta information for the categories, tags and comments. */ function xmaps_entry_footer() { // Hide category and tag text for pages. if ('post' === get_post_type()) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(esc_html__(', ', 'xmaps')); if ($categories_list && xmaps_categorized_blog()) { printf('<span class="cat-links">' . esc_html__('Posted in %1$s', 'xmaps') . '</span>', $categories_list); // WPCS: XSS OK. } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', esc_html__(', ', 'xmaps')); if ($tags_list) { printf('<span class="tags-links">' . esc_html__('Tagged %1$s', 'xmaps') . '</span>', $tags_list); // WPCS: XSS OK. } } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<span class="comments-link">'; /* translators: %s: post title */ comments_popup_link(sprintf(wp_kses(__('Leave a Comment<span class="screen-reader-text"> on %s</span>', 'xmaps'), array('span' => array('class' => array()))), get_the_title())); echo '</span>'; } edit_post_link(sprintf(esc_html__('Edit %s', 'xmaps'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>'); }