Make WordPress Core


Ignore:
Timestamp:
11/16/2005 02:54:23 AM (19 years ago)
Author:
ryan
Message:

Pull the values in WP_User::data directly into WP_User so that we don't have to do ->data->blah.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/profile.php

    r3063 r3102  
    77include_once('admin-header.php');
    88$profileuser = new WP_User($user_ID);
    9 $profiledata = &$profileuser->data;
    109
    1110$bookmarklet_height= 440;
     
    2928<legend><?php _e('Name'); ?></legend>
    3029<p><label><?php _e('Username: (no editing)'); ?><br />
    31 <input type="text" name="user_login" value="<?php echo $profiledata->user_login; ?>" disabled="disabled" />
     30<input type="text" name="user_login" value="<?php echo $profileuser->user_login; ?>" disabled="disabled" />
    3231</label></p>
    3332
    3433<p><label><?php _e('First name:') ?><br />
    35 <input type="text" name="first_name" value="<?php echo $profiledata->first_name ?>" /></label></p>
     34<input type="text" name="first_name" value="<?php echo $profileuser->first_name ?>" /></label></p>
    3635
    3736<p><label><?php _e('Last name:') ?><br />
    38 <input type="text" name="last_name"  value="<?php echo $profiledata->last_name ?>" /></label></p>
     37<input type="text" name="last_name"  value="<?php echo $profileuser->last_name ?>" /></label></p>
    3938
    4039<p><label><?php _e('Nickname:') ?><br />
    41 <input type="text" name="nickname" value="<?php echo $profiledata->nickname ?>" /></label></p>
     40<input type="text" name="nickname" value="<?php echo $profileuser->nickname ?>" /></label></p>
    4241
    4342</p><label><?php _e('Display name publicly as:') ?> <br />
    4443<select name="display_name">
    45 <option value="<?php echo $profiledata->display_name; ?>"><?php echo $profiledata->display_name; ?></option>
    46 <option value="<?php echo $profiledata->nickname ?>"><?php echo $profiledata->nickname ?></option>
    47 <option value="<?php echo $profiledata->user_login ?>"><?php echo $profiledata->user_login ?></option>
    48 <?php if ( !empty( $profiledata->first_name ) ) : ?>
    49 <option value="<?php echo $profiledata->first_name ?>"><?php echo $profiledata->first_name ?></option>
     44<option value="<?php echo $profileuser->display_name; ?>"><?php echo $profileuser->display_name; ?></option>
     45<option value="<?php echo $profileuser->nickname ?>"><?php echo $profileuser->nickname ?></option>
     46<option value="<?php echo $profileuser->user_login ?>"><?php echo $profileuser->user_login ?></option>
     47<?php if ( !empty( $profileuser->first_name ) ) : ?>
     48<option value="<?php echo $profileuser->first_name ?>"><?php echo $profileuser->first_name ?></option>
    5049<?php endif; ?>
    51 <?php if ( !empty( $profiledata->last_name ) ) : ?>
    52 <option value="<?php echo $profiledata->last_name ?>"><?php echo $profiledata->last_name ?></option>
     50<?php if ( !empty( $profileuser->last_name ) ) : ?>
     51<option value="<?php echo $profileuser->last_name ?>"><?php echo $profileuser->last_name ?></option>
    5352<?php endif; ?>
    54 <?php if ( !empty( $profiledata->first_name ) && !empty( $profiledata->last_name ) ) : ?>
    55 <option value="<?php echo $profiledata->first_name." ".$profiledata->last_name ?>"><?php echo $profiledata->first_name." ".$profiledata->last_name ?></option>
    56 <option value="<?php echo $profiledata->last_name." ".$profiledata->first_name ?>"><?php echo $profiledata->last_name." ".$profiledata->first_name ?></option>
     53<?php if ( !empty( $profileuser->first_name ) && !empty( $profileuser->last_name ) ) : ?>
     54<option value="<?php echo $profileuser->first_name." ".$profileuser->last_name ?>"><?php echo $profileuser->first_name." ".$profileuser->last_name ?></option>
     55<option value="<?php echo $profileuser->last_name." ".$profileuser->first_name ?>"><?php echo $profileuser->last_name." ".$profileuser->first_name ?></option>
    5756<?php endif; ?>
    5857</select></label></p>
     
    6362
    6463<p><label><?php _e('E-mail: (required)') ?><br />
    65 <input type="text" name="email" value="<?php echo $profiledata->user_email ?>" /></label></p>
     64<input type="text" name="email" value="<?php echo $profileuser->user_email ?>" /></label></p>
    6665
    6766<p><label><?php _e('Website:') ?><br />
    68 <input type="text" name="url" value="<?php echo $profiledata->user_url ?>" />
     67<input type="text" name="url" value="<?php echo $profileuser->user_url ?>" />
    6968</label></p>
    7069
    7170<p><label><?php _e('AIM:') ?><br />
    72 <input type="text" name="aim" value="<?php echo $profiledata->aim ?>" />
     71<input type="text" name="aim" value="<?php echo $profileuser->aim ?>" />
    7372</label></p>
    7473
    7574<p><label><?php _e('Yahoo IM:') ?><br />
    76 <input type="text" name="yim" value="<?php echo $profiledata->yim ?>" />
     75<input type="text" name="yim" value="<?php echo $profileuser->yim ?>" />
    7776</label></p>
    7877
    7978<p><label><?php _e('Jabber / Google Talk:') ?>
    80 <input type="text" name="jabber" value="<?php echo $profiledata->jabber ?>" /></label>
     79<input type="text" name="jabber" value="<?php echo $profileuser->jabber ?>" /></label>
    8180</p>
    8281</fieldset>
     
    8584<legend><?php _e('About yourself'); ?></legend>
    8685<p class="desc"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></p>
    87 <p><textarea name="description" rows="5" cols="30"><?php echo $profiledata->description ?></textarea></p>
     86<p><textarea name="description" rows="5" cols="30"><?php echo $profileuser->description ?></textarea></p>
    8887</fieldset>
    8988
Note: See TracChangeset for help on using the changeset viewer.