/** * Prints HTML with meta information for the categories, tags and comments. */ function great_entry_footer() { // Featured Star if (is_sticky() && is_home() && !is_paged()) { printf('<span class="sticky-post"><i class="fa fa-star"></i> %s</span>', __('Featured', 'great')); } // Post Author if (get_theme_mod('display_post_author', 1)) { $byline = ' <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 '<span class="byline"><i class="fa fa-user"></i> ' . $byline . '</span>'; } // 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(__(', ', 'great')); if ($categories_list && great_categorized_blog() && get_theme_mod('display_post_cats', 1)) { printf('<span class="cat-links"><i class="fa fa-folder"></i> ' . '%1$s' . '</span>', $categories_list); } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list('', __(', ', 'great')); if ($tags_list and get_theme_mod('display_post_tags', 1)) { printf('<span class="tags-links"><i class="fa fa-tags"></i> ' . '%1$s' . '</span>', $tags_list); } } }
/** * 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>'; } }
/** * 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>' // ); }
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); }
/** * 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 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>'; } }
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 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 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 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 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 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 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 current post-date/time and author. */ function pleiadesweb_posted_on() { // POSTED ON $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('<i class="fa fa-calendar"></i>' . esc_html_x(' %s', 'post date', 'pleiadesweb'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>'); // AUTHOR $byline = sprintf(esc_html_x('| escrito por %s', 'post author', 'pleiadesweb'), '<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 '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>'; // CATEGORIES /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(esc_html__(', ', 'pleiadesweb')); if ($categories_list && pleiadesweb_categorized_blog()) { echo ' | </i><span class="category-list">' . $categories_list . '</span>'; } // COMMENTS if (!post_password_required() && (comments_open() || '0' != get_comments_number())) { echo ' | <span class="comments-link">'; comments_popup_link(__('Deja un comentario', 'my-simone'), __('1 comentario', 'my-simone'), __('% comentarios', 'my-simone')); echo '</span>'; } //!post_password_required() }
function staticboards_entry_taxonomies() { $categories_list = get_the_category_list(_x(' / ', 'Used between list items, there is a space after.', 'staticboards')); if ($categories_list) { printf('<span class="cat-links">%1$s</span>', $categories_list); } }
/** * 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 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 smart_entry_category($pretag = "", $endtag = "") { $categories_list = get_the_category_list(', '); if ($categories_list) { printf($pretag . '%1$s' . $endtag, $categories_list); } }
function blogolife_entry_taxonomies_categories() { $categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'blogolife')); if ($categories_list && blogolife_categorized_blog()) { printf('<div class="cat-links taxonomies-links"><b class="screen-reader-text">%1$s</b>%2$s</div>', _x('Categories:', 'Used before category names.', 'blogolife'), $categories_list); } }
/** * Prints HTML with meta information for the current post-date/time and author. */ function river_radio_posted_on() { $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(esc_html_x('%s', 'post date', 'river-radio'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>'); $byline = sprintf(esc_html_x('%s', 'post author', 'river-radio'), '<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 '<span class="byline icons"><i class="fa fa-headphones"></i> ' . $byline . '</span><span class="posted-on icons"><i class="fa fa-calendar"></i> ' . $posted_on . '</span>'; // WPCS: XSS OK. if ('post' === get_post_type()) { $tags_list = get_the_tag_list('', esc_html__(', ', 'river-radio')); if ($tags_list) { printf('<span class="tags-links icons"><i class="fa fa-music"></i> ' . esc_html__('%1$s', 'river-radio') . '</span> ', $tags_list); // WPCS: XSS OK. } $categories_list = get_the_category_list(esc_html__(', ', 'river-radio')); if ($categories_list && river_radio_categorized_blog()) { printf('<span class="cat-links icons"><i class="fa fa-map-marker"></i> ' . esc_html__('%1$s', 'river-radio') . '</span>', $categories_list); // WPCS: XSS OK. } } }
/** * Prints HTML with category and tags for current post. * */ function hacker_entry_categories() { $categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'hacker')); 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.', 'hacker'), $categories_list); } }
/** * 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>'; } }
function the_shortcode($atts, $content = null) { global $more; $more = 0; $effect = get_option('hover_effect') == '' ? 'circle' : get_option('hover_effect'); extract(shortcode_atts(array('posts' => 3, 'order' => 'DESC', 'orderby' => 'date', 'role' => 'meteor', 'effect' => $effect), $atts)); $html = ''; if ($content) { $html .= '<h2 class="title">' . $content . '</h2>'; } query_posts(array('orderby' => $orderby, 'order' => $order, 'showposts' => $posts, 'ignore_sticky_posts' => 1)); if (have_posts()) { $html .= '<div class="posts grid">'; while (have_posts()) { the_post(); $img = str_replace('<img ', '<img ' . (isset($role) ? ' data-role="' . $role . '" ' : '') . ' ' . (isset($effect) ? ' data-effect="' . $effect . '" ' : '') . ' ', get_the_post_thumbnail(get_the_ID(), 'grid-thumb', array('data-role' => 'meteor', 'data-effect' => 'circle'))); $html .= '<article class="post">'; $html .= '<a href="' . get_permalink(get_the_ID()) . '">' . $img . '</a>'; $html .= ''; $html .= '<header class="entry-header"><div class="entry-meta"><time class="entry-date" datetime="' . esc_attr(get_the_date('c')) . '">' . get_the_date('d.m', '', '', FALSE) . '</time></div><h1 class="post-title"><a href="' . get_permalink(get_the_ID()) . '">' . get_the_title() . '</a></h1></header>'; $html .= '<div class="entry-content">' . get_the_content(__('Read More', 'plumtree')) . '</div>'; $html .= '<footer class="entry-meta">' . get_the_category_list(__(', ', 'plumtree')) . '</footer>'; $html .= ''; $html .= '</article>'; } $html .= '</div>'; } wp_reset_query(); //$html = return $html; }
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. * * @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 alaya_scrolling_posts($title = 'The Latest Posts', $columns = 3, $header = "horizontal", $number = 6, $category_slug = '', $only_sticky) { global $post, $more; $tmp_post = $post; $tmp_more = $more; $args = array('numberposts' => $number, 'orderby' => 'post_date', 'order' => 'DESC'); if ($category_slug != '') { $category_array = explode(',', $category_slug); $args = array('numberposts' => $number, 'orderby' => 'post_date', 'order' => 'DESC', 'tax_query' => array(array('taxonomy' => 'category', 'field' => 'slug', 'terms' => $category_array, 'include_children' => false))); } if ($only_sticky == 'yes') { $sticky = get_option('sticky_posts'); $args['post__in'] = $sticky; $args['ignore_sticky_posts'] = false; } $posts = get_posts($args); $i = 0; $section_id = 'scrolling_posts_' . alaya_random_string(6, false); $post_slide = '<section id="' . $section_id . '" class="scrolling_posts flexslider">' . PHP_EOL; $post_slide .= '<header class="' . $header . '"> <h5 class="archive_title"><span>' . esc_attr($title) . '</span></h5>' . PHP_EOL; if ($number > 3 && count($posts) > 3) { $post_slide .= '<div class="controlNav"><a href="javascript:void(0);" id="prev_' . $section_id . '" class="prev"><i class="fa fa-chevron-left"></i></a> <a href="javascript:void(0);" class="next" id="next_' . $section_id . '"><i class="fa fa-chevron-right"></i></a></div>'; } $post_slide .= '</header>' . PHP_EOL; $post_slide .= '<ul class="slides columns' . $columns . '">' . PHP_EOL; if ($i != count($posts)) { $post_slide .= '<li>' . PHP_EOL; } foreach ($posts as $post) { setup_postdata($post); $image_id = get_post_thumbnail_id($post->ID); $thumbnail_url = wp_get_attachment_image_src($image_id, 'blog_thumbnail', true); $more = 0; $url = get_permalink($post->ID); $title = $post->post_title; $post_slide .= '<div class="blog-post post">'; if (has_post_thumbnail()) { $post_slide .= '<div class="thumbnail"><a href="' . $url . '" title="' . $title . '"><img src="' . $thumbnail_url[0] . '" class="featured_image" alt="' . $title . '" /></a></div>'; } $post_slide .= '<span>' . get_the_category_list(', ') . '</span>'; $post_slide .= '<h4><a href="' . $url . '" title="' . $title . '">' . $title . '</a></h4>'; $post_slide .= '<p>' . alaya_truncate(get_the_excerpt(), 150) . '</p>'; $post_slide .= '</div>' . PHP_EOL; $i++; if ($i % $columns == 0) { $post_slide .= '</li>' . PHP_EOL; if ($i != count($posts)) { $post_slide .= '<li>' . PHP_EOL; } } } $post_slide .= '</ul><div class="clearfix"></div>'; $post_slide .= '<div class="' . $section_id . '_alaya_loader alaya_loader" style="top:50%;left:47%;"><i class="fa fa-spinner fa-spin"></i></div>' . PHP_EOL; $post_slide .= '</section>'; $post_slide .= "<script type='text/javascript'>\r\n\t\tjQuery(document).ready(function(\$){\r\n\t\t\t/*Scrolling Posts*/\r\n\t\t\t\$(window).load(function(){\r\n\t\t\t\t\$('#" . $section_id . "').flexslider({\r\n\t\t\t\t slideshow:true,\r\n\t\t\t\t video: true,\r\n\t\t\t\t keyboard: true,\r\n\t\t\t\t animation: 'slide',\r\n\t\t\t\t directionNav: false, \r\n\t\t\t\t controlNav:false,\r\n\t\t\t\t smoothHeight:false,\r\n\t\t\t\t mousewheel: false, \r\n\t\t\t\t multipleKeyboard: true, \r\n\t\t\t\t animationLoop: false, \r\n\t\t\t\t pauseOnHover:true,\r\n\t\t\t\t slideshowSpeed: 20000,\r\n\t\t\t\t prevText:'',\r\n\t\t\t\t nextText:'',\r\n\t\t\t\t start:function(){\r\n\t\t\t\t\t \$('." . $section_id . "_alaya_loader').hide();\r\n\t\t\t\t\t \$('#" . $section_id . " .thumbnail').each(function(){\r\n\t\t\t\t\t\t var overlay_width,overlay_height,marginTop,marginLeft;\r\n\t\t\t\t\t var wrapper_width=\$(this).width();var wrapper_height=\$(this).height(); \r\n\t\t\t\t\t\t if(\$(this).children('img').height()<wrapper_height){\r\n\t\t\t\t\t\t \$(window).load(function(){\r\n\t\t\t\t\t\t\twrapper_height=\$(this).children('img').height();\r\n\t\t\t\t\t\t if(wrapper_height==0){\r\n\t\t\t\t\t\t\t wrapper_height=200;\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\$(this).css('height',wrapper_height);\r\n\t\t\t\t\t\t })\t\t\t\t\t \r\n\t\t\t\t\t\t }\t \r\n\t\t\t\t\t\t if(\$(window).width()>800){\r\n\t\t\t\t\t overlay_width=wrapper_width-20;\r\n\t\t\t\t\t\t overlay_height=wrapper_height-20;\r\n\t\t\t\t\t\t }else{\r\n\t\t\t\t\t\t overlay_width=wrapper_width;\r\n\t\t\t\t\t\t overlay_height=wrapper_height;\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t marginTop=overlay_height/2;\r\n\t\t\t\t\t\t marginLeft=overlay_width/2;\r\n\t\t\t\t\t \$(this).children('.overlay').css({\r\n\t\t\t\t\t\t width:overlay_width+'px',\r\n\t\t\t\t\t\t height:overlay_height+'px',\r\n\t\t\t\t\t\t marginTop:'-'+marginTop+'px',\r\n\t\t\t\t\t\t marginLeft:'-'+marginLeft+'px'\r\n\t\t\t\t\t });\r\n\t\t\t\t\t\t \$(this).children('.overlay').children('i').css({\r\n\t\t\t\t\t\t width:'20px',\r\n\t\t\t\t\t\t height:'20px',\r\n\t\t\t\t\t\t display:'block',\r\n\t\t\t\t\t\t left:'50%',\r\n\t\t\t\t\t\t top:'50%',\r\n\t\t\t\t\t\t position:'absolute',\r\n\t\t\t\t\t\t marginTop:'-10px',\r\n\t\t\t\t\t\t marginLeft:'-10px'\r\n\t\t\t\t\t });\r\n\t\t\t\t\t });\r\n\t\t\t\t }\r\n\t\t\t });\r\n\t\t\t });\r\n\t\t\t \$('#prev_" . $section_id . ", #next_" . $section_id . "').on('click', function(){\r\n\t\t\t var action = \$(this).attr('class');\r\n\t\t\t \$('#" . $section_id . "').flexslider(action);\r\n\t\t\t return false;\r\n\t\t });\r\n\t });\r\n\t </script>"; $post = $tmp_post; $more = $tmp_more; return $post_slide; }
/** * 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>'); }