From b764f60728be1d4e026f9d7ae618ab47e23322f8 Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 31 Aug 2006 14:55:29 +0000 Subject: WP Merge to rev #4147 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@729 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/author-template.php | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'wp-includes/author-template.php') diff --git a/wp-includes/author-template.php b/wp-includes/author-template.php index c52a17e..a98bc63 100644 --- a/wp-includes/author-template.php +++ b/wp-includes/author-template.php @@ -1,14 +1,15 @@ display_name); } -function the_author($idmode = '', $echo = true) { - if ( $echo ) - echo get_the_author($idmode); - return get_the_author($idmode); +// Using echo = false is deprecated. Use get_the_author instead. +function the_author($deprecated = '', $deprecated_echo = true) { + if ( $deprecated_echo ) + echo get_the_author(); + return get_the_author(); } function get_the_author_description() { @@ -80,6 +81,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,20 +135,20 @@ function the_author_posts() { echo get_the_author_posts(); } -/* the_author_posts_link() requires no get_, use get_author_link() */ -function the_author_posts_link($idmode='') { +/* the_author_posts_link() requires no get_, use get_author_posts_url() */ +function the_author_posts_link($deprecated = '') { global $authordata; - echo '' . the_author($idmode, false) . ''; + echo '' . get_the_author() . ''; } -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(); if ( empty($link) ) { - $file = get_settings('home') . '/'; + $file = get_option('home') . '/'; $link = $file . '?author=' . $auth_ID; } else { if ( '' == $author_nicename ) { @@ -148,13 +157,11 @@ function get_author_link($echo = false, $author_id, $author_nicename = '') { $author_nicename = $user->user_nicename; } $link = str_replace('%author%', $author_nicename, $link); - $link = get_settings('home') . trailingslashit($link); + $link = get_option('home') . trailingslashit($link); } $link = apply_filters('author_link', $link, $author_id, $author_nicename); - if ( $echo ) - echo $link; return $link; } @@ -195,7 +202,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 .= ' '; -- cgit