diff --git a/wp-includes/author-template.php b/wp-includes/author-template.php index 9d6bedc1c3..703576618d 100644 --- a/wp-includes/author-template.php +++ b/wp-includes/author-template.php @@ -127,6 +127,23 @@ function the_author_meta($field = '', $user_id = false) { echo apply_filters('the_author_' . $field, get_the_author_meta($field, $user_id), $user_id); } +/** + * Retrieve either author's link or author's name. + * + * If the author has a home page set, return an HTML link, otherwise just return the + * author's name. + * + * @uses get_the_author_meta() + * @uses get_the_author() + */ +function get_the_author_link() { + if ( get_the_author_meta('url') ) { + return '' . get_the_author() . ''; + } else { + return get_the_author(); + } +} + /** * Display either author's link or author's name. * @@ -135,15 +152,10 @@ function the_author_meta($field = '', $user_id = false) { * * @link http://codex.wordpress.org/Template_Tags/the_author_link * @since 2.1 - * @uses get_the_author_meta() - * @uses the_author() + * @uses get_the_author_link() */ function the_author_link() { - if ( get_the_author_meta('url') ) { - echo '' . get_the_author() . ''; - } else { - the_author(); - } + echo get_the_author_link(); } /**