Make WordPress Core

Changeset 2633


Ignore:
Timestamp:
06/12/2005 11:22:06 PM (19 years ago)
Author:
matt
Message:

More user

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-blog-header.php

    r2627 r2633  
    1818
    1919endif;
     20
    2021?>
  • trunk/wp-includes/functions-post.php

    r2612 r2633  
    268268    $authordata = get_userdata( $auth_id );
    269269
    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;
    295271}
    296272
  • trunk/wp-includes/pluggable-functions.php

    r2632 r2633  
    4949        $user->{$meta->meta_key} = $meta->meta_value;
    5050
    51     die(var_dump($user));
    5251    $cache_userdata[$cache_userdata[$userid]->user_login] =& $cache_userdata[$user_id];
    5352
  • trunk/wp-includes/template-functions-author.php

    r2632 r2633  
    11<?php
     2
    23function get_the_author($idmode = '') {
    34    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;
    17 }
     5    return $author_data->display_name;
     6}
     7
    188function the_author($idmode = '', $echo = true) {
    199    if ($echo) echo get_the_author($idmode);
Note: See TracChangeset for help on using the changeset viewer.