
如何清除/刷新DNS缓存(Windows,Mac,Linux)
get_the_author_posts_link ( No parameters )
get_the_author_posts_link: 这个函数检索到文章作者的档案页的链接,链接文本是作者的名字和已发表文章的数量。它不接受任何参数,并返回一个HTML格式的链接。
检索一个指向当前文章作者页面的HTML链接。
使用get_author_posts_url()返回一个HTML格式的链接。
function get_the_author_posts_link() { global $authordata; if ( ! is_object( $authordata ) ) { return ''; } $link = sprintf( '<a href="%1$s" title="%2$s" rel="author">%3$s</a>', esc_url( get_author_posts_url( $authordata->ID, $authordata->user_nicename ) ), /* translators: %s: Author's display name. */ esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ), get_the_author() ); /** * Filters the link to the author page of the author of the current post. * * @since 2.9.0 * * @param string $link HTML link. */ return apply_filters( 'the_author_posts_link', $link ); }