• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_author_posts_url函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_author_posts_url函数的典型用法代码示例。如果您正苦于以下问题:PHP get_author_posts_url函数的具体用法?PHP get_author_posts_url怎么用?PHP get_author_posts_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_author_posts_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: presscore_search_title_shortcode

 function presscore_search_title_shortcode()
 {
     $title = '';
     $wrap_class = '';
     if (is_search()) {
         $title = get_search_query();
     } else {
         if (is_archive()) {
             if (is_category()) {
                 $title = single_cat_title('', false);
             } elseif (is_tag()) {
                 $title = single_tag_title('', false);
             } elseif (is_author()) {
                 the_post();
                 $title = '<a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta("ID"))) . '" title="' . esc_attr(get_the_author()) . '" rel="me">' . get_the_author() . '</a>';
                 $wrap_class .= ' vcard';
                 rewind_posts();
             } elseif (is_day()) {
                 $title = '<span>' . get_the_date() . '</span>';
             } elseif (is_month()) {
                 $title = '<span>' . get_the_date('F Y');
             } elseif (is_year()) {
                 $title = '<span>' . get_the_date('Y');
             } elseif (is_tax('dt_portfolio_category')) {
                 $title = single_term_title('', false);
             } elseif (is_tax('dt_gallery_category')) {
                 $title = single_term_title('', false);
             }
         }
     }
     if ($title) {
         $title = '<span' . ($wrap_class ? ' class="' . esc_attr($wrap_class) . '"' : '') . '>' . $title . '</span>';
     }
     return $title;
 }
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:35,代码来源:shortcode-search-title.php


示例2: square_posted_on

 /**
  * 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.
 }
开发者ID:jgcopple,项目名称:drgaryschwantz,代码行数:29,代码来源:template-tags.php


示例3: get_link

 /**
  * @return string
  */
 public function get_link()
 {
     if (!$this->_link) {
         $this->_link = untrailingslashit(get_author_posts_url($this->ID));
     }
     return $this->_link;
 }
开发者ID:pensesmart,项目名称:timber,代码行数:10,代码来源:timber-user.php


示例4: __output

 protected function __output()
 {
     $musicas = array();
     if ($this->property['exibir'] == 'selecionadas') {
         $musicas = $this->property['musicas'];
     } else {
         $musicas_full = tnb_get_artista_musicas($this->user_id);
         foreach ($musicas_full as $m) {
             $musicas[] = $m->ID;
         }
     }
     if (sizeof($musicas) > 0) {
         printFullPlayer(ids2playlist($musicas));
     } else {
         if ($this->editable()) {
             ?>
         <div class="tnb_add_box_icons">
             <p class="text-center bottom">
                 <?php 
             _e("Você ainda não tem nenhuma música! Clique <a href='" . get_author_posts_url($this->user_id) . "/editar/musicas/'>aqui</a> para carregá-las", "tnb");
             ?>
             </p>
         </div>
     <?php 
         }
     }
 }
开发者ID:hacklabr,项目名称:toquenobrasil,代码行数:27,代码来源:_widget_player.class.php


示例5: matraman_lite_author

function matraman_lite_author()
{
    global $post;
    echo '<span class="author"> <i class="icon icon-gist-secret"></i>';
    echo '<a href="' . get_author_posts_url(get_the_author_meta('ID')) . '">' . get_the_author_meta('display_name') . '</a>';
    echo '</span>    |';
}
开发者ID:ComEnYns,项目名称:Web-Projects,代码行数:7,代码来源:themeta.php


示例6: get_user_url

 function get_user_url($user)
 {
     if (function_exists('bp_core_get_user_domain')) {
         return bp_core_get_user_domain($user);
     }
     return get_author_posts_url($user);
 }
开发者ID:konnektiv,项目名称:do-you-know-widget,代码行数:7,代码来源:do-you-know-widget-class.php


示例7: roots_entry_meta

function roots_entry_meta()
{
    echo '<div id="author-info">';
    echo '<time class="updated" datetime="' . get_the_time('c') . '" pubdate>' . sprintf(__('Posted on %s at %s.', 'roots'), get_the_date(), get_the_time()) . '</time>';
    echo '<p class="byline author vcard">' . __('Written by', 'roots') . ' <a href="' . get_author_posts_url(get_the_author_meta('id')) . '" rel="author" class="fn">' . get_the_author() . '</a></p>';
    echo '</div>';
}
开发者ID:nbeecroft,项目名称:roots,代码行数:7,代码来源:template-tags.php


示例8: __construct

 public function __construct($wpUser)
 {
     $this->id = $wpUser->ID;
     if (function_exists('get_wp_user_avatar_src')) {
         if (strlen(get_wp_user_avatar_src($this->id, 'original')) > 0) {
             $this->image = get_wp_user_avatar_src($this->id, 'original');
         }
     }
     if (!strlen($this->image) > 0) {
         $this->image = 'http://grafikk.ukm.no/placeholder/person.jpg';
     }
     $this->company_name = get_the_author_meta('title', $this->id);
     $this->login = $wpUser->user_login;
     $this->nicename = $wpUser->nicename;
     $this->user_email = $wpUser->user_email;
     $this->url = $wpUser->url;
     $this->registered = $wpUser->registered;
     $this->display_name = $wpUser->display_name;
     $this->firstname = $wpUser->firstname;
     $this->lastname = $wpUser->lastname;
     $this->nickname = $wpUser->nickname;
     $this->description = $wpUser->description;
     $this->facebook_url = get_the_author_meta('facebook', $this->id);
     $this->title = get_the_author_meta('Title', $this->id);
     $this->link = get_author_posts_url($this->id, $this->nicename);
 }
开发者ID:mariusmandal,项目名称:wpoo,代码行数:26,代码来源:Author.php


示例9: twentyten_posted_on

function twentyten_posted_on()
{
    $meta = array();
    $meta['author'] = sprintf(__('%1$s <span class="meta-sep">by</span> %2$s', 'wordcampbase'), sprintf('<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>', get_permalink(), esc_attr(get_the_time()), get_the_date()), sprintf('<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>', get_author_posts_url(get_the_author_meta('ID')), sprintf(esc_attr__('View all posts by %s', 'wordcampbase'), get_the_author()), get_the_author()));
    $meta['sep'] = ' <span class="meta-sep meta-sep-bull">&bull;</span> ';
    $meta['comments'] = array('before' => '<span class="comments-link">', 'after' => '</span>', 'zero' => __('Leave a comment', 'wordcampbase'), 'one' => __('1 Comment', 'wordcampbase'), 'many' => __('% Comments', 'wordcampbase'));
    $meta['edit'] = array('title' => __('Edit', 'wordcampbase'), 'before' => '<span class="edit-link">', 'after' => '</span>');
    $meta['br'] = '<br />';
    // Just to have.
    $meta['order'] = array('author', 'sep', 'comments', 'edit');
    $meta = apply_filters('wcb_entry_meta', $meta);
    if (!is_array($meta) || !isset($meta['order'])) {
        return;
    }
    foreach ($meta['order'] as $type) {
        $content = $meta[$type];
        switch ($type) {
            case 'comments':
                echo $content['before'];
                comments_popup_link($content['zero'], $content['one'], $content['many']);
                echo $content['after'];
                break;
            case 'edit':
                if (isset($meta['sep'])) {
                    $content['before'] = $meta['sep'] . $content['before'];
                }
                edit_post_link($content['title'], $content['before'], $content['after']);
                break;
            default:
                echo $content;
        }
    }
}
开发者ID:RobStino,项目名称:wordcamp-sunshine-coast,代码行数:33,代码来源:twentyten-overrides.php


示例10: tags

 public function tags()
 {
     if (!did_action('pre_get_posts')) {
         return array();
     }
     $queried_object = get_queried_object();
     $tags = array();
     $default_tags = array('og:type' => 'website', 'og:locale' => get_locale(), 'og:site_name' => get_bloginfo('name'), 'og:image' => $this->get_image_url());
     if (is_front_page()) {
         $tags = array('og:url' => home_url('/'), 'og:title' => get_bloginfo('name'), 'og:description' => get_bloginfo('description'));
     } else {
         if (is_singular()) {
             $tags = array('og:type' => 'article', 'og:url' => get_permalink($queried_object), 'og:title' => get_the_title($queried_object), 'og:description' => $this->generate_preview($queried_object->post_content), 'article:published_time' => date('c', strtotime($queried_object->post_date_gmt)), 'article:modified_time' => date('c', strtotime($queried_object->post_modified_gmt)), 'article:author' => get_author_posts_url($queried_object->post_author));
         } else {
             if (is_tax() || is_category() || is_tag()) {
                 $tags = array('og:url' => get_term_link($queried_object), 'og:title' => $queried_object->name, 'og:description' => $this->generate_preview($queried_object->description));
             } else {
                 if (is_author()) {
                     $tags = array('og:type' => 'profile', 'og:url' => get_author_posts_url($queried_object->ID), 'og:title' => $queried_object->display_name, 'og:description' => $this->generate_preview($queried_object->user_description), 'profile:first_name' => get_the_author_meta('first_name', $queried_object->ID), 'profile:last_name' => get_the_author_meta('last_name', $queried_object->ID));
                 }
             }
         }
     }
     $tags = array_merge($default_tags, $tags);
     return apply_filters('appthemes_open_graph_meta_tags', $tags);
 }
开发者ID:kalushta,项目名称:darom,代码行数:26,代码来源:open-graph.php


示例11: fulgent_entry_meta

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);
}
开发者ID:jeremybradbury,项目名称:wp-ninja-kit,代码行数:33,代码来源:theme-default-setup.php


示例12: shaped_blog_posted_on

    function shaped_blog_posted_on()
    {
        ?>

            <ul class="list-inline">
                <li>
                    <span class="author vcard">
                        <?php 
        _e('By ', 'shaped-blog');
        printf('<a class="url fn n" href="%1$s">%2$s</a>', esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_html(get_the_author()));
        ?>
                    </span>
                </li>
                <li>
                    on <span class="posted-on"><?php 
        the_time('M d, Y');
        ?>
</span>
                </li>
                <?php 
        if (get_the_category_list()) {
            ?>
                    <li>
                        in <span class="posted-in">
                            <?php 
            echo get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'shaped-blog'));
            ?>
                        </span>
                    </li>
                <?php 
        }
        ?>
            </ul>
        <?php 
    }
开发者ID:michaelcoll,项目名称:theme-wordpress,代码行数:35,代码来源:template-tags.php


示例13: redwaves_entry_author

 function redwaves_entry_author()
 {
     if ('post' == get_post_type()) {
         $byline = sprintf(_x('%s', 'post author', 'redwaves-lite'), '<span class="author vcard"><span class="url fn"><a href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . esc_html(get_the_author()) . '</a></span></span>');
         echo '<span class="theauthor"><i class="fa fa-user"></i> ' . $byline . '</span>';
     }
 }
开发者ID:sawan34,项目名称:tanzi,代码行数:7,代码来源:template-tags.php


示例14: beans_post_meta_author_shortcode

/**
 * Echo post meta author shortcode.
 *
 * @since 1.0.0
 */
function beans_post_meta_author_shortcode()
{
    beans_output('beans_post_meta_author_prefix', __('By ', 'beans'));
    echo beans_open_markup('beans_post_meta_author', 'a', array('href' => esc_url(get_author_posts_url(get_the_author_meta('ID')))));
    echo beans_output('beans_post_meta_author_text', get_the_author());
    echo beans_close_markup('beans_post_meta_author', 'a');
}
开发者ID:ThemeButler,项目名称:tm-demo,代码行数:12,代码来源:post-shortcodes.php


示例15: kanec_entry_meta

/**
 * 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>';
    }
}
开发者ID:vonkanehoffen,项目名称:kanec-wp-theme,代码行数:34,代码来源:template-tags.php


示例16: ushipnetwork_entry_footer

 /**
  * Prints HTML with meta information for the categories, tags and comments.
  */
 function ushipnetwork_entry_footer()
 {
     // Hide category and tag text for pages.
     if ('post' === get_post_type()) {
         $byline = sprintf(esc_html_x('by %s', 'post author', 'ushipnetwork'), '<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 '<div class="byline">' . '<div class="authorship">' . $byline . '</div>' . '<div class="share">';
         include "share.php";
         echo '</div>' . '</div>';
         $posttags = get_the_tags();
         $count = 0;
         $separator = ', ';
         $output = '';
         if (!empty($posttags)) {
             echo '<span class="tag-list">tags: ';
             foreach ($posttags as $posttag) {
                 $count++;
                 if ($count <= 2) {
                     $output .= '<a href="' . esc_url(get_tag_link($posttag->term_id)) . '" alt="' . esc_attr(sprintf(__('View all posts in %s', 'textdomain'), $posttag->name)) . '">' . esc_html($posttag->name) . '</a>' . $separator;
                 }
             }
             echo trim($output, $separator);
         }
         echo '</span>';
     }
     edit_post_link(sprintf(esc_html__('Edit %s', 'ushipnetwork'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>');
 }
开发者ID:rmikeska,项目名称:ushipnetwork,代码行数:29,代码来源:template-tags.php


示例17: widget

 function widget($args, $instance)
 {
     extract($args, EXTR_SKIP);
     $instance = wp_parse_args((array) $instance, array('title' => __('Blog Authors', 'academy'), 'number' => '6', 'order' => 'registered'));
     $orderdir = 'DESC';
     if ($instance['order'] == 'display_name') {
         $orderdir = 'ASC';
     }
     $title = apply_filters('widget_title', empty($instance['title']) ? __('Blog Authors', 'academy') : $instance['title'], $instance, $this->id_base);
     $out = $before_widget;
     $out .= $before_title . $title . $after_title;
     $counter = 0;
     $users = get_users(array('number' => $instance['number'], 'orderby' => $instance['order'], 'order' => $orderdir));
     $out .= '<div class="users-listing">';
     foreach ($users as $user) {
         $name = trim($user->first_name . ' ' . $user->last_name);
         $counter++;
         $out .= '<div class="user-image ';
         if ($counter == 3) {
             $out .= 'last';
         }
         $out .= '"><div class="bordered-image">';
         $out .= '<a title="' . $name . '" href="' . get_author_posts_url($user->ID) . '">' . get_avatar($user->ID) . '</a>';
         $out .= '</div></div>';
         if ($counter == 3) {
             $out .= '<div class="clear"></div>';
             $counter = 0;
         }
     }
     $out .= '</div>';
     $out .= $after_widget;
     echo $out;
 }
开发者ID:rinodung,项目名称:wordpress-demo,代码行数:33,代码来源:themex.authors.php


示例18: shortcode_list_posts

function shortcode_list_posts($atts, $content = null)
{
    extract(shortcode_atts(array('posts_per_page' => -1, 'cat' => '', 'tag' => '', 'order' => '', 'order_by' => ''), $atts));
    $args = array('post_type' => 'post', 'posts_per_page' => $posts_per_page, 'post_status' => 'publish');
    if (!empty($cat)) {
        $cat = split(',', str_replace(" ", "", $cat));
        $args['category__and'] = $cat;
    }
    if (!empty($tag)) {
        $tag = split(',', str_replace(" ", "", $tag));
        $args['tag__in'] = $tag;
    }
    if ($order) {
        $args['order'] = $order;
    }
    if ($order_by) {
        $args['orderby'] = $order_by;
    }
    $my_query = new WP_Query();
    $my_query->query($args);
    $content = '<ul class="post-list" >';
    while ($my_query->have_posts()) {
        $my_query->the_post();
        $author = get_the_author_meta('display_name');
        $author_url = get_author_posts_url(get_the_author_meta('ID'));
        $content .= '<li><a href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_title() . '</a> <span>- by <a href="' . $author_url . '" title="' . $author . '">' . $author . '</a> on ' . get_the_time('F j, Y') . '</span></li>' . "\n";
    }
    $content .= '</ul><!-- end .post-list -->';
    //wp_reset_query();
    return remove_wpautop($content);
}
开发者ID:nixter,项目名称:d.school,代码行数:31,代码来源:list-posts.php


示例19: widget

 /**
  * Outputs the widget based on the arguments input through the widget controls.
  *
  * @since  0.1.0
  * @access public
  * @param  array  $sidebar
  * @param  array  $instance
  * @return void
  */
 function widget($sidebar, $instance)
 {
     $instance = wp_parse_args($instance, $this->defaults);
     // Set up the arguments for get_users().
     $args = array('role' => $instance['role'], 'meta_key' => $instance['meta_key'], 'meta_value' => $instance['meta_value'], 'include' => !empty($instance['include']) ? explode(',', $instance['include']) : '', 'exclude' => !empty($instance['exclude']) ? explode(',', $instance['exclude']) : '', 'search' => $instance['search'], 'orderby' => $instance['orderby'], 'order' => $instance['order'], 'offset' => !empty($instance['offset']) ? intval($instance['offset']) : '', 'number' => !empty($instance['number']) ? intval($instance['number']) : '');
     // Output the theme's $before_widget wrapper.
     echo $sidebar['before_widget'];
     // If a title was input by the user, display it.
     if ($instance['title']) {
         echo $sidebar['before_title'] . apply_filters('widget_title', $instance['title'], $instance, $this->id_base) . $sidebar['after_title'];
     }
     // Get users.
     $users = get_users($args);
     // If users were found.
     if (!empty($users)) {
         echo '<ul class="xoxo users">';
         // Loop through each available user, creating a list item with a link to the user's archive.
         foreach ($users as $user) {
             $class = sanitize_html_class("user-{$user->ID}");
             if (is_author($user->ID)) {
                 $class .= ' current-user';
             }
             printf('<li class="%s"><a href="%s">%s</a>', esc_attr($class), esc_url(get_author_posts_url($user->ID, $user->user_nicename)), esc_html($user->display_name));
         }
         echo '</ul>';
     }
     // Close the theme's widget wrapper.
     echo $sidebar['after_widget'];
 }
开发者ID:sciserver,项目名称:SciServer-WordPress-Website,代码行数:38,代码来源:class-widget-users.php


示例20: jkl_index_posted_on

 /**
  * 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 -->';
 }
开发者ID:jekkilekki,项目名称:theme-jkl,代码行数:29,代码来源:template-tags.php



注:本文中的get_author_posts_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_author_rss_link函数代码示例发布时间:2022-05-15
下一篇:
PHP get_author_name函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap