diff --git a/wp-includes/author-template.php b/wp-includes/author-template.php index 7ca9d296f..da24590b2 100644 --- a/wp-includes/author-template.php +++ b/wp-includes/author-template.php @@ -80,6 +80,14 @@ function the_author_url() { echo get_the_author_url(); } +function the_author_link() { + if (get_the_author_url()) { + echo '' . get_the_author() . ''; + } else { + the_author(); + } +} + function get_the_author_icq() { global $authordata; return $authordata->icq; @@ -126,14 +134,14 @@ function the_author_posts() { echo get_the_author_posts(); } -/* the_author_posts_link() requires no get_, use get_author_link() */ +/* the_author_posts_link() requires no get_, use get_author_posts_url() */ function the_author_posts_link($idmode='') { global $authordata; - echo '' . the_author($idmode, false) . ''; + echo '' . the_author($idmode, false) . ''; } -function get_author_link($echo = false, $author_id, $author_nicename = '') { +function get_author_posts_url($author_id, $author_nicename = '') { global $wpdb, $wp_rewrite, $post, $cache_userdata; $auth_ID = $author_id; $link = $wp_rewrite->get_author_permastruct(); @@ -153,8 +161,6 @@ function get_author_link($echo = false, $author_id, $author_nicename = '') { $link = apply_filters('author_link', $link, $author_id, $author_nicename); - if ( $echo ) - echo $link; return $link; } @@ -195,7 +201,7 @@ function wp_list_authors($args = '') { if ( !$hide_empty ) $link = $name; } else { - $link = 'display_name)) . '">' . $name . ''; + $link = 'display_name)) . '">' . $name . ''; if ( (! empty($feed_image)) || (! empty($feed)) ) { $link .= ' '; diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index 87c38bbe0..bba457adb 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -477,4 +477,13 @@ function get_archives($type='', $limit='', $format='html', $before = '', $after return wp_get_archives($args); } +// Deprecated. Use get_author_posts_url(). +function get_author_link($echo = false, $author_id, $author_nicename = '') { + $link = get_author_posts_link($author_id, $author_nicename); + + if ( $echo ) + echo $link; + return $link; +} + ?>