当前位置: 首页>>代码示例>>PHP>>正文


PHP get_author_feed_link函数代码示例

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


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

示例1: handleChange

 /**
  * Triggers on a change event and adds the relevant URL's to the ban list
  *
  * Function inspired by Varnish HTTP Purge
  * https://github.com/Ipstenu/varnish-http-purge/blob/master/plugin/varnish-http-purge.php#L277
  *
  * @param  [type] $postId [description]
  * @return [type]         [description]
  */
 protected function handleChange($postId)
 {
     // If this is a valid post we want to purge the post, the home page and any associated tags & cats
     // If not, purge everything on the site.
     $validPostStatus = array("publish", "trash");
     $thisPostStatus = get_post_status($postId);
     // If this is a revision, stop.
     if (get_permalink($postId) !== true && !in_array($thisPostStatus, $validPostStatus)) {
         return;
     } else {
         // array to collect all our URLs
         $listofurls = array();
         // Category purge based on Donnacha's work in WP Super Cache
         $categories = get_the_category($postId);
         if ($categories) {
             foreach ($categories as $cat) {
                 $this->invalidateUrl(get_category_link($cat->term_id));
             }
         }
         // Tag purge based on Donnacha's work in WP Super Cache
         $tags = get_the_tags($postId);
         if ($tags) {
             foreach ($tags as $tag) {
                 $this->invalidateUrl(get_tag_link($tag->term_id));
             }
         }
         // Author URL
         $this->invalidateUrl(get_author_posts_url(get_post_field('post_author', $postId)));
         $this->invalidateUrl(get_author_feed_link(get_post_field('post_author', $postId)));
         // Archives and their feeds
         $archiveurls = array();
         if (get_post_type_archive_link(get_post_type($postId)) == true) {
             $this->invalidateUrl(get_post_type_archive_link(get_post_type($postId)));
             $this->invalidateUrl(get_post_type_archive_feed_link(get_post_type($postId)));
         }
         // Post URL
         $this->invalidateUrl(get_permalink($postId));
         // Feeds
         $this->invalidateUrl(get_bloginfo_rss('rdf_url'));
         $this->invalidateUrl(get_bloginfo_rss('rss_url'));
         $this->invalidateUrl(get_bloginfo_rss('rss2_url'));
         $this->invalidateUrl(get_bloginfo_rss('atom_url'));
         $this->invalidateUrl(get_bloginfo_rss('comments_rss2_url'));
         $this->invalidateUrl(get_post_comments_feed_link($postId));
         // Home Page and (if used) posts page
         $this->invalidateUrl(home_url('/'));
         if (get_option('show_on_front') == 'page') {
             $this->invalidateUrl(get_permalink(get_option('page_for_posts')));
         }
     }
     // Filter to add or remove urls to the array of purged urls
     // @param array $purgeUrls the urls (paths) to be purged
     // @param int $postId the id of the new/edited post
     // $this->invalidateUrls = apply_filters( 'vhp_purge_urls', $this->invalidateUrls, $postId );
 }
开发者ID:Rareloop,项目名称:wp-varnish-invalidator,代码行数:64,代码来源:VarnishInvalidator.php

示例2: Bing_archive_header

/**
	*存档页信息
	*http://www.bgbk.org
*/
function Bing_archive_header()
{
    if (!is_archive()) {
        return;
    }
    if (is_author()) {
        $dashicons = 'admin-users';
        $name = $GLOBALS['authordata']->display_name;
        $description = get_the_author_meta('description');
        $feed_link = get_author_feed_link($GLOBALS['authordata']->ID);
    } elseif (is_date()) {
        $dashicons = 'calendar';
        if (is_day()) {
            $format = __('Y年m月d日', 'Bing');
        } elseif (is_month()) {
            $format = __('Y年m月', 'Bing');
        } else {
            $format = __('Y年', 'Bing');
        }
        $name = get_the_date($format);
        $description = sprintf(__('%s发布的文章', 'Bing'), $name);
    } else {
        $dashicons = is_tag() ? 'tag' : 'category';
        $name = single_term_title('', false);
        $description = term_description();
        $feed_link = get_term_feed_link(get_queried_object_id(), get_queried_object()->taxonomy);
    }
    $description = strip_tags($description);
    ?>
	<div class="span12 archive-header">
		<article class="panel">
			<header class="panel-header">
				<h3>
					<span class="dashicons dashicons-<?php 
    echo $dashicons;
    ?>
"></span><?php 
    echo $name;
    ?>
				</h3>
				<?php 
    if (Bing_mpanel('breadcrumbs')) {
        Bing_breadcrumbs('<span class="separator dashicons dashicons-arrow-right-alt2"></span>', '<span class="right breadcrumb"%s>', '</span>', '<span class="dashicons dashicons-admin-home"></span>' . __('首页', 'Bing'));
    }
    ?>
			</header>
			<?php 
    echo empty($description) ? __('无描述', 'Bing') : $description;
    if (!empty($feed_link)) {
        printf('<a href="%s" title="%s" class="feed-link"><span class="dashicons dashicons-rss"></span></a>', esc_url($feed_link), esc_attr(__('此存档的 Feed 源,可以使用 RSS 阅读器订阅这些内容', 'Bing')));
    }
    ?>
		</article>
	</div>
<?php 
}
开发者ID:w392807287,项目名称:FirstRepository,代码行数:60,代码来源:archive-header.php

示例3: getAuthors

 public function getAuthors()
 {
     global $wpdb;
     $query = "SELECT u.ID, u.display_name AS name, ud.meta_value as bio, yim.meta_value as yim, COUNT(p.ID) as post_count, u.user_email, u.user_url FROM wp_users AS u\r\n                  LEFT JOIN wp_usermeta AS ud ON (u.ID = ud.user_id AND ud.meta_key = 'description')\r\n                  LEFT JOIN wp_usermeta AS yim ON (u.ID = yim.user_id AND yim.meta_key = 'yim')\r\n                  LEFT JOIN wp_posts AS p ON (p.post_author = u.ID AND p.post_type='post' AND p.post_status = 'publish')\r\n                  GROUP BY u.ID HAVING COUNT(p.ID) > 0 ORDER BY COUNT(p.ID) DESC";
     $authorsQuery = $wpdb->get_results($query);
     $authors = array();
     foreach ($authorsQuery as $author) {
         $authors[$author->ID] = array();
         $authors[$author->ID]['avatar'] = get_avatar_url($author->ID, '150');
         $authors[$author->ID]['url'] = get_author_posts_url($author->ID);
         $authors[$author->ID]['name'] = $author->name;
         $authors[$author->ID]['bio'] = $author->bio;
         $authors[$author->ID]['count'] = $author->post_count;
         $authors[$author->ID]['feed'] = get_author_feed_link($author->ID);
         $authors[$author->ID]['email'] = $author->user_email;
         $authors[$author->ID]['website'] = $author->user_url;
         $authors[$author->ID]['yim'] = $author->yim;
     }
     wp_reset_query();
     return $authors;
 }
开发者ID:jonnSmith,项目名称:jadeWP,代码行数:21,代码来源:wpAuthors.php

示例4: wp_list_authors

/**
 * List all the authors of the blog, with several options available.
 *
 * <ul>
 * <li>optioncount (boolean) (false): Show the count in parenthesis next to the
 * author's name.</li>
 * <li>exclude_admin (boolean) (true): Exclude the 'admin' user that is
 * installed bydefault.</li>
 * <li>show_fullname (boolean) (false): Show their full names.</li>
 * <li>hide_empty (boolean) (true): Don't show authors without any posts.</li>
 * <li>feed (string) (''): If isn't empty, show links to author's feeds.</li>
 * <li>feed_image (string) (''): If isn't empty, use this image to link to
 * feeds.</li>
 * <li>echo (boolean) (true): Set to false to return the output, instead of
 * echoing.</li>
 * <li>style (string) ('list'): Whether to display list of authors in list form
 * or as a string.</li>
 * <li>html (bool) (true): Whether to list the items in html form or plaintext.
 * </li>
 * </ul>
 *
 * @link http://codex.wordpress.org/Template_Tags/wp_list_authors
 * @since 1.2.0
 * @param array $args The argument array.
 * @return null|string The output, if echo is set to false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true);
    $args = wp_parse_args($args, $defaults);
    extract($args, EXTR_SKIP);
    $return = '';
    $query_args = wp_array_slice_assoc($args, array('orderby', 'order', 'number'));
    $query_args['fields'] = 'ids';
    $authors = get_users($query_args);
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE post_type = 'post' AND " . get_private_posts_cap_sql('post') . " GROUP BY post_author") as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ($authors as $author_id) {
        $author = get_userdata($author_id);
        if ($exclude_admin && 'admin' == $author->display_name) {
            continue;
        }
        $posts = isset($author_count[$author->ID]) ? $author_count[$author->ID] : 0;
        if (!$posts && $hide_empty) {
            continue;
        }
        $link = '';
        if ($show_fullname && $author->first_name && $author->last_name) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$html) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' == $style) {
            $return .= '<li>';
        }
        $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . esc_attr(sprintf(__("Posts by %s"), $author->display_name)) . '">' . $name . '</a>';
        if (!empty($feed_image) || !empty($feed)) {
            $link .= ' ';
            if (empty($feed_image)) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID) . '"';
            $alt = $title = '';
            if (!empty($feed)) {
                $title = ' title="' . esc_attr($feed) . '"';
                $alt = ' alt="' . esc_attr($feed) . '"';
                $name = $feed;
                $link .= $title;
            }
            $link .= '>';
            if (!empty($feed_image)) {
                $link .= '<img src="' . esc_url($feed_image) . '" style="border: none;"' . $alt . $title . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($feed_image)) {
                $link .= ')';
            }
        }
        if ($optioncount) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= 'list' == $style ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if (!$echo) {
        return $return;
    }
    echo $return;
}
开发者ID:radman,项目名称:noobyo-blog,代码行数:100,代码来源:author-template.php

示例5: flush_post


//.........这里部分代码省略.........
         if ($this->_config->get_boolean('pgcache.purge.archive.monthly') && $post) {
             $post_date = strtotime($post->post_date);
             $post_year = gmdate('Y', $post_date);
             $post_month = gmdate('m', $post_date);
             $posts_per_page = get_option('posts_per_page');
             $posts_number = $this->_get_archive_posts_count($post_year, $post_month);
             $posts_pages_number = @ceil($posts_number / $posts_per_page);
             $month_link = get_month_link($post_year, $post_month);
             $month_uri = str_replace($domain_url, '', $month_link);
             for ($pagenum = 1; $pagenum <= $posts_pages_number; $pagenum++) {
                 $month_pagenum_link = $this->_get_pagenum_link($month_uri, $pagenum);
                 $month_pagenum_uri = str_replace($domain_url, '', $month_pagenum_link);
                 $uris[] = $month_pagenum_uri;
             }
         }
         /**
          * Yearly archive URLs
          */
         if ($this->_config->get_boolean('pgcache.purge.archive.yearly') && $post) {
             $post_date = strtotime($post->post_date);
             $post_year = gmdate('Y', $post_date);
             $posts_per_page = get_option('posts_per_page');
             $posts_number = $this->_get_archive_posts_count($post_year);
             $posts_pages_number = @ceil($posts_number / $posts_per_page);
             $year_link = get_year_link($post_year);
             $year_uri = str_replace($domain_url, '', $year_link);
             for ($pagenum = 1; $pagenum <= $posts_pages_number; $pagenum++) {
                 $year_pagenum_link = $this->_get_pagenum_link($year_uri, $pagenum);
                 $year_pagenum_uri = str_replace($domain_url, '', $year_pagenum_link);
                 $uris[] = $year_pagenum_uri;
             }
         }
         /**
          * Feed URLs
          */
         if ($this->_config->get_boolean('pgcache.purge.feed.blog')) {
             foreach ($feeds as $feed) {
                 $feed_link = get_feed_link($feed);
                 $feed_uri = str_replace($domain_url, '', $feed_link);
                 $uris[] = $feed_uri;
             }
         }
         if ($this->_config->get_boolean('pgcache.purge.feed.comments')) {
             foreach ($feeds as $feed) {
                 $post_comments_feed_link = get_post_comments_feed_link($post_id, $feed);
                 $post_comments_feed_uri = str_replace($domain_url, '', $post_comments_feed_link);
                 $uris[] = $post_comments_feed_uri;
             }
         }
         if ($this->_config->get_boolean('pgcache.purge.feed.author') && $post) {
             foreach ($feeds as $feed) {
                 $author_feed_link = get_author_feed_link($post->post_author, $feed);
                 $author_feed_uri = str_replace($domain_url, '', $author_feed_link);
                 $uris[] = $author_feed_uri;
             }
         }
         if ($this->_config->get_boolean('pgcache.purge.feed.terms')) {
             foreach ($terms as $term) {
                 foreach ($feeds as $feed) {
                     $term_feed_link = get_term_feed_link($term->term_id, $term->taxonomy, $feed);
                     $term_feed_uri = str_replace($domain_url, '', $term_feed_link);
                     $uris[] = $term_feed_uri;
                 }
             }
         }
         /**
          * Flush cache
          */
         if (count($uris)) {
             $cache =& $this->_get_cache();
             $mobile_groups = $this->_get_mobile_groups();
             $referrer_groups = $this->_get_referrer_groups();
             $encryptions = $this->_get_encryptions();
             $compressions = $this->_get_compressions();
             foreach ($uris as $uri) {
                 foreach ($mobile_groups as $mobile_group) {
                     foreach ($referrer_groups as $referrer_group) {
                         foreach ($encryptions as $encryption) {
                             foreach ($compressions as $compression) {
                                 $page_key = $this->_get_page_key($uri, $mobile_group, $referrer_group, $encryption, $compression);
                                 $cache->delete($page_key);
                             }
                         }
                     }
                 }
             }
             /**
              * Purge varnish servers
              */
             if ($this->_config->get_boolean('varnish.enabled')) {
                 $varnish =& w3_instance('W3_Varnish');
                 foreach ($uris as $uri) {
                     $varnish->purge($uri);
                 }
             }
         }
         return true;
     }
     return false;
 }
开发者ID:nxtclass,项目名称:NXTClass,代码行数:101,代码来源:PgCacheFlush.php

示例6: the_author_description

:</b> <?php 
            the_author_description();
            ?>
</p>
			<p><i>&raquo; Read more by <?php 
            the_author_posts_link();
            ?>
</i><br/>
<?php 
            ob_start();
            the_author_ID();
            $AuthorID = ob_get_contents();
            ob_end_clean();
            ?>
			<i><a href="<?php 
            echo get_author_feed_link($AuthorID);
            ?>
"><img src="/wp-content/themes/welovedc-theme/img/feed.png" alt="RSS" /><?php 
            the_author();
            ?>
's RSS feed</a></i></p>
		</div><!--/abouttheauthor-->

		<div id="articletools" class="sidebar-section">
			<h2><span>Article Tools</span></h2>
			<ul>
			<li id="tools-print"><a href="<?php 
            the_permalink();
            ?>
?print">Printable View</a></li>
			<li id="tools-email"><?php 
开发者ID:boboroshi,项目名称:welovedc-theme,代码行数:31,代码来源:sidebar.php

示例7: coauthors_wp_list_authors

/**
 * List all the *co-authors* of the blog, with several options available.
 * optioncount (boolean) (false): Show the count in parenthesis next to the author's name.
 * show_fullname (boolean) (false): Show their full names.
 * hide_empty (boolean) (true): Don't show authors without any posts.
 * feed (string) (''): If isn't empty, show links to author's feeds.
 * feed_image (string) (''): If isn't empty, use this image to link to feeds.
 * echo (boolean) (true): Set to false to return the output, instead of echoing.
 * @param array $args The argument array.
 * @return null|string The output, if echo is set to false.
 */
function coauthors_wp_list_authors($args = array())
{
    global $coauthors_plus;
    $defaults = array('optioncount' => false, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'number' => 20);
    $args = wp_parse_args($args, $defaults);
    $return = '';
    $term_args = array('orderby' => 'name', 'hide_empty' => 0, 'number' => (int) $args['number']);
    $author_terms = get_terms($coauthors_plus->coauthor_taxonomy, $term_args);
    $authors = array();
    foreach ($author_terms as $author_term) {
        // Something's wrong in the state of Denmark
        if (false === ($coauthor = $coauthors_plus->get_coauthor_by('user_login', $author_term->name))) {
            continue;
        }
        $authors[$author_term->name] = $coauthor;
        $authors[$author_term->name]->post_count = $author_term->count;
    }
    $authors = apply_filters('coauthors_wp_list_authors_array', $authors);
    foreach ((array) $authors as $author) {
        $link = '';
        if ($args['show_fullname'] && ($author->first_name && $author->last_name)) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$args['html']) {
            if ($author->post_count == 0) {
                if (!$args['hide_empty']) {
                    $return .= $name . ', ';
                }
            } else {
                $return .= $name . ', ';
            }
            // No need to go further to process HTML.
            continue;
        }
        if (!($author->post_count == 0 && $args['hide_empty']) && 'list' == $args['style']) {
            $return .= '<li>';
        }
        if ($author->post_count == 0) {
            if (!$args['hide_empty']) {
                $link = $name;
            }
        } else {
            $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . esc_attr(sprintf(__('Posts by %s', 'co-authors-plus'), $name)) . '">' . esc_html($name) . '</a>';
            if (!empty($args['feed_image']) || !empty($args['feed'])) {
                $link .= ' ';
                if (empty($args['feed_image'])) {
                    $link .= '(';
                }
                $link .= '<a href="' . get_author_feed_link($author->ID) . '"';
                if (!empty($args['feed'])) {
                    $title = ' title="' . esc_attr($args['feed']) . '"';
                    $alt = ' alt="' . esc_attr($args['feed']) . '"';
                    $name = $feed;
                    $link .= $title;
                }
                $link .= '>';
                if (!empty($args['feed_image'])) {
                    $link .= '<img src="' . esc_url($args['feed_image']) . "\" style=\"border: none;\"{$alt}{$title}" . ' />';
                } else {
                    $link .= $name;
                }
                $link .= '</a>';
                if (empty($args['feed_image'])) {
                    $link .= ')';
                }
            }
            if ($args['optioncount']) {
                $link .= ' (' . $author->post_count . ')';
            }
        }
        if (!($author->post_count == 0 && $args['hide_empty']) && 'list' == $args['style']) {
            $return .= $link . '</li>';
        } else {
            if (!$args['hide_empty']) {
                $return .= $link . ', ';
            }
        }
    }
    $return = trim($return, ', ');
    if (!$args['echo']) {
        return $return;
    }
    echo $return;
}
开发者ID:gopinathshiva,项目名称:wordpress-vip-plugins,代码行数:97,代码来源:template-tags.php

示例8: getAuthor

 public function getAuthor()
 {
     $pathway = array();
     $user = wpi_get_current_author();
     //  rss
     $pathway['first'] = array($user->display_name . ' feeds', array('href' => get_author_feed_link($user->ID), 'type' => 'application/rss+xml', 'title' => __($user->display_name . ' | Subscribe to this author feed', WPI_META), 'hreflang' => get_hreflang(), 'rel' => self::RSS_REL, 'class' => 'rtxt rss16', 'rev' => 'feed:rss2'));
     // home
     $pathway['home'] = $this->getFrontpage();
     $pathway['archive'] = array(__('Author', WPI_META), array('href' => '#content-top', 'title' => __('Author | Skip to content', WPI_META)));
     $pathway['last'] = array($user->display_name, array('href' => '#content-top', 'class' => self::DN_ARROW, 'title' => __('Author | Skip to content', WPI_META)));
     return $pathway;
 }
开发者ID:Creativebq,项目名称:wp-istalker,代码行数:12,代码来源:pathway.php

示例9: wp_list_authors

/**
 * List all the authors of the blog, with several options available.
 *
 * <ul>
 * <li>optioncount (boolean) (false): Show the count in parenthesis next to the
 * author's name.</li>
 * <li>exclude_admin (boolean) (true): Exclude the 'admin' user that is
 * installed bydefault.</li>
 * <li>show_fullname (boolean) (false): Show their full names.</li>
 * <li>hide_empty (boolean) (true): Don't show authors without any posts.</li>
 * <li>feed (string) (''): If isn't empty, show links to author's feeds.</li>
 * <li>feed_image (string) (''): If isn't empty, use this image to link to
 * feeds.</li>
 * <li>echo (boolean) (true): Set to false to return the output, instead of
 * echoing.</li>
 * <li>style (string) ('list'): Whether to display list of authors in list form
 * or as a string.</li>
 * <li>html (bool) (true): Whether to list the items in html for or plaintext.
 * </li>
 * </ul>
 *
 * @link http://codex.wordpress.org/Template_Tags/wp_list_authors
 * @since 1.2.0
 * @param array $args The argument array.
 * @return null|string The output, if echo is set to false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true);
    $r = wp_parse_args($args, $defaults);
    extract($r, EXTR_SKIP);
    $return = '';
    /** @todo Move select to get_authors(). */
    $users = get_users_of_blog();
    $author_ids = array();
    foreach ((array) $users as $user) {
        $author_ids[] = $user->user_id;
    }
    if (count($author_ids) > 0) {
        $author_ids = implode(',', $author_ids);
        $authors = $wpdb->get_results("SELECT ID, user_nicename from {$wpdb->users} WHERE ID IN({$author_ids}) " . ($exclude_admin ? "AND user_login <> 'admin' " : '') . "ORDER BY display_name");
    } else {
        $authors = array();
    }
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE post_type = 'post' AND " . get_private_posts_cap_sql('post') . " GROUP BY post_author") as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ((array) $authors as $author) {
        $link = '';
        $author = get_userdata($author->ID);
        $posts = isset($author_count[$author->ID]) ? $author_count[$author->ID] : 0;
        $name = $author->display_name;
        if ($show_fullname && ($author->first_name != '' && $author->last_name != '')) {
            $name = "{$author->first_name} {$author->last_name}";
        }
        if (!$html) {
            if ($posts == 0) {
                if (!$hide_empty) {
                    $return .= $name . ', ';
                }
            } else {
                $return .= $name . ', ';
            }
            // No need to go further to process HTML.
            continue;
        }
        if (!($posts == 0 && $hide_empty) && 'list' == $style) {
            $return .= '<li>';
        }
        if ($posts == 0) {
            if (!$hide_empty) {
                $link = $name;
            }
        } else {
            $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . esc_attr(sprintf(__("Posts by %s"), $author->display_name)) . '">' . $name . '</a>';
            if (!empty($feed_image) || !empty($feed)) {
                $link .= ' ';
                if (empty($feed_image)) {
                    $link .= '(';
                }
                $link .= '<a href="' . get_author_feed_link($author->ID) . '"';
                if (!empty($feed)) {
                    $title = ' title="' . esc_attr($feed) . '"';
                    $alt = ' alt="' . esc_attr($feed) . '"';
                    $name = $feed;
                    $link .= $title;
                }
                $link .= '>';
                if (!empty($feed_image)) {
                    $link .= "<img src=\"" . esc_url($feed_image) . "\" style=\"border: none;\"{$alt}{$title}" . ' />';
                } else {
                    $link .= $name;
                }
                $link .= '</a>';
                if (empty($feed_image)) {
                    $link .= ')';
                }
            }
//.........这里部分代码省略.........
开发者ID:ericandrewlewis,项目名称:wordpress-mu,代码行数:101,代码来源:author-template.php

示例10: get_header

<?php

get_header();
?>

<div id="userpage">
<div id="main">

<?php 
if (have_posts()) {
    $first_post = true;
    while (have_posts()) {
        the_post();
        $author_feed_url = '';
        if (function_exists('get_author_feed_link')) {
            $author_feed_url = get_author_feed_link(get_the_author_ID());
        } else {
            $author_feed_url = get_author_rss_link(false, get_the_author_ID(), get_the_author_nickname());
        }
        ?>

<?php 
        if ($first_post === true) {
            ?>
	<h2>
		<?php 
            echo get_avatar(get_the_author_email(), 48);
            ?>
		Updates from <?php 
            the_author_posts_link();
            ?>
开发者ID:alx,项目名称:pressmark,代码行数:31,代码来源:author.php

示例11: get_header

 * @since OSN 1.0
 */
get_header();
?>

	<section id="primary" class="content-area">
		<div id="content" class="site-content" role="main">

			<?php 
if (have_posts()) {
    ?>

				<?php 
    $curauth = isset($_GET['author_name']) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
    if (!empty($curauth)) {
        echo '<div class="author-feed">Subscribe to the RSS feed: <a href="' . get_author_feed_link($curauth->ID) . '" title="' . sprintf(__('Subscribe to RSS', 'appthemes'), $curauth->name) . '">' . '<img src="' . get_stylesheet_directory_uri() . '/images/feed-icon-28x28.png" alt="RSS feed icon" />' . '</a></div>';
    }
    /*
     * Since we called the_post() above, we need to rewind
     * the loop back to the beginning that way we can run
     * the loop properly, in full.
     */
    rewind_posts();
    // Start the Loop.
    while (have_posts()) {
        the_post();
        /*
         * Include the post format-specific template for the content. If you want to
         * use this in a child theme, then include a file called called content-___.php
         * (where ___ is the post format) and that will be used instead.
         */
开发者ID:TheOpenSourceNinja,项目名称:OSN-WordPress-Theme,代码行数:31,代码来源:author.php

示例12: esc_html

" class="icon-link"><?php 
        echo esc_html($byline_text);
        ?>
</a>
			<?php 
    } else {
        ?>
				<?php 
        // $coauthor covers base case (1 dimensional) or where coauthors were defined.
        ?>
				<?php 
        foreach ($coauthors as $author) {
            ?>
					<div class="follow-author">
					<a href="<?php 
            echo get_author_feed_link($author->ID, '');
            ?>
" class="icon-rss"></a>
					<?php 
            if ($twitter = get_the_author_meta('twitter', $author->ID)) {
                ?>
						<a href="https://twitter.com/<?php 
                echo largo_twitter_url_to_username(esc_url($twitter));
                ?>
" class="icon-twitter"></a>
					<?php 
            }
            ?>
					<a href="<?php 
            echo get_author_posts_url($author->ID, $author->user_nicename);
            ?>
开发者ID:GaryJones,项目名称:Largo,代码行数:31,代码来源:footer-sticky.php

示例13: locate_author_urls

 /**
  * Get author links related to this post.
  *
  * @since 1.0.0.
  *
  * @param  WP_Post $post The post object to search for related author information.
  * @return array               The related author URLs.
  */
 public function locate_author_urls($post)
 {
     $author = $post->post_author;
     $author_page = get_author_posts_url($author);
     $author_feed = get_author_feed_link($author);
     $this->set_related_url($author_page, 'author');
     $this->set_related_url($author_feed, 'author');
     return array($author_page, $author_feed);
 }
开发者ID:KostasNi,项目名称:purgely,代码行数:17,代码来源:related-urls.php

示例14: get_author_feed_link

            <ul>
              <?php 
if ($user_url && $user_url != '') {
    ?>
                <li class="author-url">
                    <a href="<?php 
    echo $user_url;
    ?>
"><i class="icon-home"></i></a>
                </li>
              <?php 
}
?>
              <li class="author-rss">
                  <a href="<?php 
echo get_author_feed_link($curauth->ID);
?>
"><i class="icon-rss"></i></a>
              </li>
              <?php 
if ($twitter_profile && $twitter_profile != '') {
    ?>
                <li class="author-twitter">
                    <a href="<?php 
    echo $twitter_profile;
    ?>
"><i class="icon-twitter"></i></a>
                </li>
              <?php 
}
?>
开发者ID:jehzlau,项目名称:surfagility,代码行数:31,代码来源:author.php

示例15: get_author_feed_link

				</div>
			</div>
		</div>




		<article id="mainContent" class="splitLayout overviewPage">
			<div class="container blogPageMainContent">
				<div class="rightSplit  grid-3-3">
					<div class="mainStream grid-2-3">
						<section id="blogPageContent" class="pageContent">
						<div class="subscribeTopWrapper">
							<?php 
$catName = $activeMenuObj->cat_name;
$feedUrl = get_author_feed_link($authorId, '');
?>
							<span class="currentCatLink rssCat">Browse Post Write by : <?php 
echo $authorObj->display_name;
?>
</span>
							<!--<a class="feedBtn" href="<?php 
echo $feedUrl;
?>
">Subscribe to <?php 
echo $authorObj->display_name;
?>
</a>-->
						</div>
						<div class="blogsWrapper">
							<input type="hidden" class="pageNo" value="<?php 
开发者ID:thabofletcher,项目名称:tc-site,代码行数:31,代码来源:author.php


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