diff --git a/wp-blog-header.php b/wp-blog-header.php index 8f54a9b20..c087324fc 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 5f362d5f9..4b057d3bf 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 3288401b5..e27d2be46 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 ee83e8257..791f75d63 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);