From 10586c54bc15e1ca6124c65a6f51358db47b14e2 Mon Sep 17 00:00:00 2001 From: matt Date: Sun, 12 Jun 2005 23:22:06 +0000 Subject: [PATCH] More user git-svn-id: http://svn.automattic.com/wordpress/trunk@2633 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-blog-header.php | 3 ++- wp-includes/functions-post.php | 26 +---------------------- wp-includes/pluggable-functions.php | 1 - wp-includes/template-functions-author.php | 16 +++----------- 4 files changed, 6 insertions(+), 40 deletions(-) diff --git a/wp-blog-header.php b/wp-blog-header.php index 8f54a9b205..c087324fc1 100644 --- a/wp-blog-header.php +++ b/wp-blog-header.php @@ -17,4 +17,5 @@ gzip_compression(); require_once(ABSPATH . WPINC . '/template-loader.php'); endif; -?> + +?> \ No newline at end of file diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index 5f362d5f98..4b057d3bfb 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -267,31 +267,7 @@ function get_cat_ID($cat_name='General') { function get_author_name( $auth_id ) { $authordata = get_userdata( $auth_id ); - switch( $authordata['user_idmode'] ) { - case 'nickname': - $authorname = $authordata['user_nickname']; - break; - case 'login': - $authorname = $authordata['user_login']; - break; - case 'firstname': - $authorname = $authordata['user_firstname']; - break; - case 'lastname': - $authorname = $authordata['user_lastname']; - break; - case 'namefl': - $authorname = $authordata['user_firstname'].' '.$authordata['user_lastname']; - break; - case 'namelf': - $authorname = $authordata['user_lastname'].' '.$authordata['user_firstname']; - break; - default: - $authorname = $authordata['user_nickname']; - break; - } - - return $authorname; + return $authordata->display_name; } // get extended entry info () diff --git a/wp-includes/pluggable-functions.php b/wp-includes/pluggable-functions.php index 3288401b5b..e27d2be462 100644 --- a/wp-includes/pluggable-functions.php +++ b/wp-includes/pluggable-functions.php @@ -48,7 +48,6 @@ function get_userdata( $user_id ) { foreach ( $metavalues as $meta ) $user->{$meta->meta_key} = $meta->meta_value; - die(var_dump($user)); $cache_userdata[$cache_userdata[$userid]->user_login] =& $cache_userdata[$user_id]; return $cache_userdata[$user_id]; diff --git a/wp-includes/template-functions-author.php b/wp-includes/template-functions-author.php index ee83e82578..791f75d63b 100644 --- a/wp-includes/template-functions-author.php +++ b/wp-includes/template-functions-author.php @@ -1,20 +1,10 @@ user_idmode; - } - - if ($idmode == 'nickname') $id = $authordata->user_nickname; - if ($idmode == 'login') $id = $authordata->user_login; - if ($idmode == 'firstname') $id = $authordata->user_firstname; - if ($idmode == 'lastname') $id = $authordata->user_lastname; - if ($idmode == 'namefl') $id = $authordata->user_firstname.' '.$authordata->user_lastname; - if ($idmode == 'namelf') $id = $authordata->user_lastname.' '.$authordata->user_firstname; - if (!$idmode) $id = $authordata->user_nickname; - - return $id; + return $author_data->display_name; } + function the_author($idmode = '', $echo = true) { if ($echo) echo get_the_author($idmode); return get_the_author($idmode);