示例#1
1
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function square_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', 'square'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     $byline = sprintf(esc_html_x('by %s', 'post author', 'square'), '<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>');
     $comment_count = get_comments_number();
     // get_comments_number returns only a numeric value
     if (comments_open()) {
         if ($comment_count == 0) {
             $comments = __('No Comments', 'square');
         } elseif ($comment_count > 1) {
             $comments = $comment_count . __(' Comments', 'square');
         } else {
             $comments = __('1 Comment', 'square');
         }
         $comment_link = '<a href="' . get_comments_link() . '">' . $comments . '</a>';
     } else {
         $comment_link = __(' Comment Closed', 'square');
     }
     echo '<span class="posted-on"><i class="fa fa-clock-o"></i>' . $posted_on . '</span><span class="byline"> ' . $byline . '</span><span class="comment-count"><i class="fa fa-comments-o"></i>' . $comment_link . "</span>";
     // WPCS: XSS OK.
 }
示例#2
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function usbasske_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('Posted on %s', 'post date', 'usbasske'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     $byline = sprintf(esc_html_x('by %s', 'post author', 'usbasske'), '<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>');
     // Display the author avatar if the author has a Gravatar
     $author_id = get_the_author_meta('ID');
     if (usbasske_validate_gravatar($author_id)) {
         echo '<div class="meta-content has-avatar">';
         echo '<div class="author-avatar">' . get_avatar($author_id) . '</div>';
     } else {
         echo '<div class="meta-content">';
     }
     echo '<span class="byline"> ' . $byline . '</span><span class="posted-on">' . $posted_on . '</span>';
     // WPCS: XSS OK.
     if (!post_password_required() && (comments_open() || get_comments_number())) {
         echo '<span class="comments-link">';
         comments_popup_link(esc_html__('Leave a comment', 'usbasske'), esc_html__('1 Comment', 'usbasske'), esc_html__('% Comments', 'usbasske'));
         echo '</span>';
     }
     echo '</div><!-- .meta-content -->';
 }
示例#3
0
/**
 * 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;
}
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>';
    }
}
示例#5
0
    /**
     * Prints HTML with meta information for the current post-date/time and author.
     */
    function shapely_posted_on_no_cat()
    {
        $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()));
        ?>

		<ul class="post-meta">
		<li><span class="posted-on"><?php 
        echo $time_string;
        ?>
</span></li>
		<li><span><?php 
        echo esc_html__('by', 'shapely');
        ?>
 <a
					href="<?php 
        echo esc_url(get_author_posts_url(get_the_author_meta('ID')));
        ?>
"
					title="<?php 
        echo esc_attr(get_the_author());
        ?>
"><?php 
        esc_html(the_author());
        ?>
</a></span>
		</li>
		</ul><?php 
    }
示例#6
0
 function nebula_admin_bar_menus($wp_admin_bar)
 {
     $node_id = is_admin() ? 'view' : 'edit';
     $new_content_node = $wp_admin_bar->get_node($node_id);
     if ($new_content_node) {
         $new_content_node->title = ucfirst($node_id) . ' Page <span class="nebula-admin-light" style="font-size: 10px; color: #a0a5aa; color: rgba(240, 245, 250, .6);">(ID: ' . get_the_id() . ')</span>';
         $wp_admin_bar->add_node($new_content_node);
     }
     //Add created date under View/Edit node
     //@TODO "Nebula" 0: get_the_author() is not working when in Admin
     $wp_admin_bar->add_node(array('parent' => $node_id, 'id' => 'nebula-created', 'title' => '<i class="nebula-admin-fa fa fa-fw fa-calendar-o" style="font-family: \'FontAwesome\'; color: #a0a5aa; color: rgba(240, 245, 250, .6); margin-right: 5px;"></i> Created: ' . get_the_date() . ' <span class="nebula-admin-light" style="font-size: 10px; color: #a0a5aa; color: rgba(240, 245, 250, .6);">(' . get_the_author() . ')</span>', 'href' => get_edit_post_link(), 'meta' => array('target' => '_blank')));
     //Add modified date under View/Edit node
     if (get_the_modified_date() != get_the_date()) {
         //If the post has been modified
         $manage_author = get_the_modified_author() ? get_the_modified_author() : get_the_author();
         $wp_admin_bar->add_node(array('parent' => $node_id, 'id' => 'nebula-modified', 'title' => '<i class="nebula-admin-fa fa fa-fw fa-clock-o" style="font-family: \'FontAwesome\'; color: #a0a5aa; color: rgba(240, 245, 250, .6); margin-right: 5px;"></i> Modified: ' . get_the_modified_date() . ' <span class="nebula-admin-light" style="font-size: 10px; color: #a0a5aa; color: rgba(240, 245, 250, .6);">(' . $manage_author . ')</span>', 'href' => get_edit_post_link(), 'meta' => array('target' => '_blank')));
     }
     /* @TODO "Nebula" 0: Other information to consider under the View/Edit node:
     			- Status (Published, Draft, etc)
     			- Visibility (Public)
     			- Revisions (count)
     		*/
     $wp_admin_bar->add_node(array('id' => 'nebula', 'title' => '<i class="nebula-admin-fa fa fa-fw fa-star" style="font-family: \'FontAwesome\'; color: #a0a5aa; color: rgba(240, 245, 250, .6); margin-right: 5px;"></i> Nebula', 'href' => 'https://gearside.com/nebula/', 'meta' => array('target' => '_blank')));
     $scss_last_processed = get_option('nebula_scss_last_processed') ? date('l, F j, Y - g:i:sa', get_option('nebula_scss_last_processed')) : 'Never';
     $wp_admin_bar->add_node(array('parent' => 'nebula', 'id' => 'nebula-options-scss', 'title' => '<i class="nebula-admin-fa fa fa-fw fa-paint-brush" style="font-family: \'FontAwesome\'; color: #a0a5aa; color: rgba(240, 245, 250, .6); margin-right: 5px;"></i> Re-process All SCSS Files', 'href' => esc_url(add_query_arg('sass', 'true')), 'meta' => array('title' => 'Last: ' . $scss_last_processed)));
     $wp_admin_bar->add_node(array('parent' => 'nebula', 'id' => 'nebula-options', 'title' => '<i class="nebula-admin-fa fa fa-fw fa-cog" style="font-family: \'FontAwesome\'; color: #a0a5aa; color: rgba(240, 245, 250, .6); margin-right: 5px;"></i> Options', 'href' => get_admin_url() . 'themes.php?page=nebula_options'));
     $wp_admin_bar->add_node(array('parent' => 'nebula-options', 'id' => 'nebula-options-help', 'title' => '<i class="nebula-admin-fa fa fa-fw fa-question" style="font-family: \'FontAwesome\'; color: #a0a5aa; color: rgba(240, 245, 250, .6); margin-right: 5px;"></i> Help & Documentation', 'href' => 'https://gearside.com/nebula/documentation/options/', 'meta' => array('target' => '_blank')));
     $wp_admin_bar->add_node(array('parent' => 'nebula', 'id' => 'nebula-github', 'title' => '<i class="nebula-admin-fa fa fa-fw fa-github" style="font-family: \'FontAwesome\'; color: #a0a5aa; color: rgba(240, 245, 250, .6); margin-right: 5px;"></i> Nebula Github', 'href' => 'https://github.com/chrisblakley/Nebula', 'meta' => array('target' => '_blank')));
     $wp_admin_bar->add_node(array('parent' => 'nebula-github', 'id' => 'nebula-github-issues', 'title' => 'Issues', 'href' => 'https://github.com/chrisblakley/Nebula/issues', 'meta' => array('target' => '_blank')));
     $wp_admin_bar->add_node(array('parent' => 'nebula-github', 'id' => 'nebula-github-changelog', 'title' => 'Changelog', 'href' => 'https://github.com/chrisblakley/Nebula/commits/master', 'meta' => array('target' => '_blank')));
 }
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function abc_nuorisotominta_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', 'abc-nuorisotominta'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     /*
     	$posted_on = sprintf(
     		esc_html_x( 'Posted on %s', 'post date', 'abc-nuorisotominta' ),
     		'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
     	);
     */
     /*
     	$byline = sprintf(
     		esc_html_x( 'by %s', 'post author', 'abc-nuorisotominta' ),
     		'<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>';
     // WPCS: XSS OK.
 }
 /**
  * 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()
 }
示例#9
0
 /**
  * Prints HTML with meta information for the current post-date/time, author, comment count and categories.
  */
 function ultra_posted_on()
 {
     echo '<div class="entry-meta-inner">';
     if (is_sticky() && is_home() && !is_paged()) {
         echo '<span class="featured-post">' . __('Sticky', 'ultra') . '</span>';
     }
     if (is_home() && siteorigin_setting('blog_post_date') || is_archive() && siteorigin_setting('blog_post_date') || is_search() && siteorigin_setting('blog_post_date')) {
         echo '<span class="entry-date"><a href="' . esc_url(get_permalink()) . '" rel="bookmark"><time class="published" datetime="' . esc_attr(get_the_date('c')) . '">' . esc_html(get_the_date('j F Y')) . '</time><time class="updated" datetime="' . esc_attr(get_the_modified_date('c')) . '">' . esc_html(get_the_modified_date()) . '</time></span></a>';
     }
     if (is_single() && siteorigin_setting('blog_post_date')) {
         echo '<span class="entry-date"><time class="published" datetime="' . esc_attr(get_the_date('c')) . '">' . esc_html(get_the_date('j F Y')) . '</time><time class="updated" datetime="' . esc_attr(get_the_modified_date('c')) . '">' . esc_html(get_the_modified_date()) . '</time></span>';
     }
     if (siteorigin_setting('blog_post_author')) {
         echo '<span class="byline"><span class="author vcard"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '" rel="author">' . esc_html(get_the_author()) . '</a></span></span>';
     }
     if (comments_open() && siteorigin_setting('blog_post_comment_count')) {
         echo '<span class="comments-link">';
         comments_popup_link(__('Leave a comment', 'ultra'), __('1 Comment', 'ultra'), __('% Comments', 'ultra'));
         echo '</span>';
     }
     echo '</div>';
     if (is_single() && siteorigin_setting('navigation_post_nav')) {
         the_post_navigation($args = array('prev_text' => '', 'next_text' => ''));
     }
 }
示例#10
0
    /**
     * 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.
            }
        }
    }
示例#11
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function jkl_index_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()));
     $byline = sprintf(esc_html('%s'), '<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>');
     if ('chat' === get_post_format() || 'image' === get_post_format() || 'gallery' === get_post_format() || 'audio' === get_post_format() || 'video' === get_post_format()) {
         $string = ucwords(get_post_format());
         $posted_on = $string . ': <a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>';
     } else {
         $posted_on = sprintf(esc_html_x('Date: %s', 'post date', 'jkl'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     }
     $meta_class = is_single() ? 'format-small-meta' : 'meta-content-index';
     echo '<div class="' . $meta_class . '">';
     echo '<span class="posted-on">' . $posted_on . '</span>';
     // WPCS: XSS OK.
     if (is_single()) {
         echo '<span class="byline">' . $byline . '</span>';
         if (!has_post_format('quote')) {
             jkl_better_taxonomy_listing('category', 1);
         }
     }
     echo '</div><!-- .meta-content-index -->';
 }
/**
 * 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>';
    }
}
示例#13
0
function generate_posted_on()
{
    if ('post' !== get_post_type()) {
        return;
    }
    $date = apply_filters('generate_post_date', true);
    $author = apply_filters('generate_post_author', true);
    $time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time>';
    if (get_the_time('U') !== get_the_modified_time('U')) {
        $time_string .= '<time class="updated" datetime="%3$s" itemprop="dateModified">%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()));
    // If our date is enabled, show it
    if ($date) {
        printf('<span class="posted-on">%1$s</span>', sprintf('<a href="%1$s" title="%2$s" rel="bookmark">%3$s</a>', esc_url(get_permalink()), esc_attr(get_the_time()), $time_string));
    }
    // If our author is enabled, show it
    if ($author) {
        printf(' <span class="byline">%1$s</span>', sprintf('<span class="author vcard" itemtype="http://schema.org/Person" itemscope="itemscope" itemprop="author">%1$s <a class="url fn n" href="%2$s" title="%3$s" rel="author" itemprop="url"><span class="author-name" itemprop="name">%4$s</span></a></span>', __('by', 'generate'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', 'generate'), get_the_author())), esc_html(get_the_author())));
    }
    // If comments enabled link to them
    if (comments_open() && is_single()) {
        echo '<span class="comments-link"><a href="#reply-title">Add a comment</a></span>';
    }
}
示例#14
0
/**
 * Prints HTML with meta information for the current post-date/time and author.
 */
function banana_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(
		_x( 'Posted on %s', 'post date', 'banana' ),
		'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
	);

	$byline = sprintf(
		_x( 'by %s', 'post author', 'banana' ),
		'<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>';

}
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function tm_vals_blog_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()));
     // comments in header
     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', 'tm-vals-blog'), esc_html__('%', 'tm-vals-blog'));
         echo '</span>';
     }
     /*	$posted_on = sprintf(
     		esc_html_x( 'Posted on %s', 'post date', 'tm-vals-blog' ),
     		'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
     	);
     
     	$byline = sprintf(
     		esc_html_x( 'by %s', 'post author', 'tm-vals-blog' ),
     		'<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>'; // WPCS: XSS OK.
     */
 }
示例#16
0
 /**
  * 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>';
 }
示例#17
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function zacklive_posted_on()
 {
     $time_string = '<time class="entry-date published updated" datetime="%1$s" itemprop="datePublished">%2$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('<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     $byline = sprintf('<span class="author vcard" itemprop="name"><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"><span class="glyphicon glyphicon-calendar"></span>' . $posted_on . '</span><span class="byline"><span class="glyphicon glyphicon-user"></span>' . $byline . '</span>';
 }
示例#18
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function listable_posted_on()
 {
     $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')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date()));
     $posted_on = sprintf('<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     echo '<span class="posted-on">' . $posted_on . '</span>';
     // WPCS: XSS OK.
 }
function bhr_append_last_author($content)
{
    global $post, $pp;
    $html = "<div class=\"post-author\">";
    $html .= sprintf(__("Last edited by %s on %s at %s", "bhr"), get_the_modified_author(), get_the_modified_date(), get_the_modified_time());
    $html .= "</div>";
    return $content . $html;
}
示例#20
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function buffer_posted_on()
 {
     $time_string = '<time class="entry-date published" datetime="%1$s">%2$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(_x(' on %s', 'post date', 'buffer'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     $byline = sprintf(_x('%s', 'post author', 'buffer'), '<a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . '<span class="author-avatar">' . get_avatar(get_the_author_meta('ID')) . esc_html(get_the_author()) . '</span></a>');
     echo '<span class="byline"> ' . $byline . '<span class="posted-on">' . $posted_on . '</span>';
 }
示例#21
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function custom_posted_on()
 {
     $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>';
     if (get_the_time('U') !== get_the_modified_time('U')) {
         $time_string .= '<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()));
     printf('<span class="posted-on">%1$s</span>', sprintf('<a href="%1$s" rel="bookmark">%2$s</a>', esc_url(get_permalink()), $time_string));
 }
示例#22
0
 /**
  * Returns HTML with meta information for the current post-date/time.
  *
  * @return string Formatted post-date.
  */
 function gently_entry_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()));
     return $time_string;
 }
示例#23
0
 /**
  * Prints HTML with date information for current post.
  *
  * Create your own tpbc_entry_date() function to override in a child theme.
  *
  * @since TPBC 1.0
  */
 function tpbc_entry_date()
 {
     $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')), 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.', 'tpbc'), esc_url(get_permalink()), $time_string);
 }
示例#24
0
 /**
  * div.meta-date > time.meta-date-published
  */
 function _s_post_date()
 {
     $time_string = '<time class="meta-date-published" datetime="%1$s">%2$s</time>';
     if (get_the_time('U') !== get_the_modified_time('U')) {
         $time_string = '<time class="meta-date-published" datetime="%1$s">%2$s</time><time class="meta-date-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()));
     printf(__('<span class="meta-date">Post on : %s</span>', 'post date', '_s'), $time_string);
 }
 function mythology_posted_on()
 {
     $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>';
     if (get_the_time('U') !== get_the_modified_time('U')) {
         $time_string = '<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()));
     printf(__('<span class="posted-on">Posted on %1$s</span><span class="byline"> by %2$s</span>', 'mythology'), sprintf('<a href="%1$s" rel="bookmark">%2$s</a>', esc_url(get_permalink()), $time_string), sprintf('<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>', esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_html(get_the_author())));
 }
示例#26
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function zerif_posted_on_child()
 {
     $time_string = '<time class="entry-date published" itemprop="datePublished" datetime="%1$s">%2$s</time>';
     if (get_the_time('U') !== get_the_modified_time('U')) {
         $time_string .= '<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()));
     printf(__('<span class="posted-on">Originally appeared in <a href="%2$s">%3$s</a> on  %1$s</span>', 'zerif'), sprintf('<a href="%1$s" rel="bookmark">%2$s</a>', esc_url(get_day_link(get_the_date('Y'), get_the_date('m'), get_the_date('d'))), $time_string), esc_attr(get_field('original_source_url')), esc_attr(get_field('original_source_media_outlet')));
 }
示例#27
0
 protected function _getData($count, $startIndex)
 {
     global $post;
     $tmpPost = $post;
     list($orderBy, $order) = N2Parse::parse($this->data->get('postscategoryorder', 'post_date|*|desc'));
     $postsFilter = array('include' => '', 'exclude' => '', 'meta_key' => '', 'meta_value' => '', 'post_type' => 'post', 'post_mime_type' => '', 'post_parent' => '', 'post_status' => 'publish', 'suppress_filters' => false, 'offset' => $startIndex, 'posts_per_page' => $count, 'orderby' => $orderBy, 'order' => $order);
     $categories = (array) N2Parse::parse($this->data->get('postscategory'));
     if (!in_array(0, $categories)) {
         $postsFilter['category'] = implode(',', $categories);
     }
     $posts = get_posts($postsFilter);
     $data = array();
     for ($i = 0; $i < count($posts); $i++) {
         $record = array();
         $post = $posts[$i];
         setup_postdata($post);
         $record['id'] = $post->ID;
         $record['url'] = get_permalink();
         $record['title'] = apply_filters('the_title', get_the_title());
         $record['description'] = $record['content'] = get_the_content();
         $record['author_name'] = $record['author'] = get_the_author();
         $record['author_url'] = get_the_author_meta('url');
         $record['date'] = get_the_date();
         $record['excerpt'] = get_the_excerpt();
         $record['modified'] = get_the_modified_date();
         $category = get_the_category($post->ID);
         if (isset($category[0])) {
             $record['category_name'] = $category[0]->name;
             $record['category_link'] = get_category_link($category[0]->cat_ID);
         } else {
             $record['category_name'] = '';
             $record['category_link'] = '';
         }
         $record['featured_image'] = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
         if (!$record['featured_image']) {
             $record['featured_image'] = '';
         }
         $record['thumbnail'] = $record['image'] = $record['featured_image'];
         $record['url_label'] = 'View post';
         if (class_exists('acf')) {
             $fields = get_fields($post->ID);
             if (count($fields)) {
                 foreach ($fields as $k => $v) {
                     $record[$k] = $v;
                 }
             }
         }
         $data[$i] =& $record;
         unset($record);
     }
     wp_reset_postdata();
     $post = $tmpPost;
     if ($post) {
         setup_postdata($post);
     }
     return $data;
 }
function twentysixteen_entry_date()
{
    $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">  <i class="fa fa-pencil"></i> %4$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><i class="fa fa-calendar"></i> %2$s</span>', _x('Posted on', 'Used before publish date.', 'twentysixteen'), $time_string);
}
示例#29
0
 function blogolife_entry_date()
 {
     $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')), get_the_date(), esc_attr(get_the_modified_date('c')), get_the_modified_date());
     printf('<span class="posted-on f-link"><a href="%1$s" rel="bookmark">%2$s</a></span>', esc_url(get_permalink()), $time_string);
 }
示例#30
0
 /**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function go_big_posted_on()
 {
     $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')), 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', 'go-big'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     $byline = sprintf(esc_html_x('%s', 'post author', 'go-big'), '<span class="author vcard"><i class="fa fa-user"></i> <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"><i class="fa fa-calendar"></i> ' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>';
     // WPCS: XSS OK.
 }