Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

More user

git-svn-id: http://svn.automattic.com/wordpress/trunk@2633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit 10586c54bc15e1ca6124c65a6f51358db47b14e2 1 parent de9cc8b
authored
3  wp-blog-header.php
@@ -17,4 +17,5 @@
17 17
 require_once(ABSPATH . WPINC . '/template-loader.php');
18 18
 
19 19
 endif;
20  
-?>
  20
+
  21
+?>
26  wp-includes/functions-post.php
@@ -267,31 +267,7 @@ function get_cat_ID($cat_name='General') {
267 267
 function get_author_name( $auth_id ) {
268 268
 	$authordata = get_userdata( $auth_id );
269 269
 
270  
-	switch( $authordata['user_idmode'] ) {
271  
-		case 'nickname':
272  
-			$authorname = $authordata['user_nickname'];
273  
-			break;
274  
-		case 'login':
275  
-			$authorname = $authordata['user_login'];
276  
-			break;
277  
-		case 'firstname':
278  
-			$authorname = $authordata['user_firstname'];
279  
-			break;
280  
-		case 'lastname':
281  
-			$authorname = $authordata['user_lastname'];
282  
-			break;
283  
-		case 'namefl':
284  
-			$authorname = $authordata['user_firstname'].' '.$authordata['user_lastname'];
285  
-			break;
286  
-		case 'namelf':
287  
-			$authorname = $authordata['user_lastname'].' '.$authordata['user_firstname'];
288  
-			break;
289  
-		default:
290  
-			$authorname = $authordata['user_nickname'];
291  
-			break;
292  
-	}
293  
-
294  
-	return $authorname;
  270
+	return $authordata->display_name;
295 271
 }
296 272
 
297 273
 // get extended entry info (<!--more-->)
1  wp-includes/pluggable-functions.php
@@ -48,7 +48,6 @@ function get_userdata( $user_id ) {
48 48
 	foreach ( $metavalues as $meta )
49 49
 		$user->{$meta->meta_key} = $meta->meta_value;
50 50
 
51  
-	die(var_dump($user));
52 51
 	$cache_userdata[$cache_userdata[$userid]->user_login] =& $cache_userdata[$user_id];
53 52
 
54 53
 	return $cache_userdata[$user_id];
16  wp-includes/template-functions-author.php
... ...
@@ -1,20 +1,10 @@
1 1
 <?php
  2
+
2 3
 function get_the_author($idmode = '') {
3 4
     global $authordata;
4  
-    if (empty($idmode)) {
5  
-        $idmode = $authordata->user_idmode;
6  
-    }
7  
-
8  
-    if ($idmode == 'nickname')    $id = $authordata->user_nickname;
9  
-    if ($idmode == 'login')    $id = $authordata->user_login;
10  
-    if ($idmode == 'firstname')    $id = $authordata->user_firstname;
11  
-    if ($idmode == 'lastname')    $id = $authordata->user_lastname;
12  
-    if ($idmode == 'namefl')    $id = $authordata->user_firstname.' '.$authordata->user_lastname;
13  
-    if ($idmode == 'namelf')    $id = $authordata->user_lastname.' '.$authordata->user_firstname;
14  
-    if (!$idmode) $id = $authordata->user_nickname;
15  
-    
16  
-    return $id;
  5
+    return $author_data->display_name;
17 6
 }
  7
+
18 8
 function the_author($idmode = '', $echo = true) {
19 9
 	if ($echo) echo get_the_author($idmode);
20 10
 	return get_the_author($idmode);

0 notes on commit 10586c5

Please sign in to comment.
Something went wrong with that request. Please try again.