Make WordPress Core


Ignore:
Timestamp:
08/06/2009 09:59:52 PM (17 years ago)
Author:
westi
Message:

Make it much easier to filter contact methods from user profiles adding and removing at will. Fixes #10240 props joostdevalk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/user-edit.php

    r11526 r11784  
    268268</tr>
    269269
    270 <tr>
    271     <th><label for="aim"><?php echo apply_filters('user_aim_label', __('AIM')); ?></label></th>
    272     <td><input type="text" name="aim" id="aim" value="<?php echo esc_attr($profileuser->aim) ?>" class="regular-text" /></td>
    273 </tr>
    274 
    275 <tr>
    276     <th><label for="yim"><?php echo apply_filters('user_yim_label', __('Yahoo IM')); ?></label></th>
    277     <td><input type="text" name="yim" id="yim" value="<?php echo esc_attr($profileuser->yim) ?>" class="regular-text" /></td>
    278 </tr>
    279 
    280 <tr>
    281     <th><label for="jabber"><?php echo apply_filters('user_jabber_label', __('Jabber / Google Talk')); ?></label></th>
    282     <td><input type="text" name="jabber" id="jabber" value="<?php echo esc_attr($profileuser->jabber) ?>" class="regular-text" /></td>
    283 </tr>
     270<?php
     271    foreach (_wp_get_user_contactmethods() as $name => $desc) {
     272?>
     273<tr>
     274    <th><label for="<?php echo $name; ?>"><?php echo apply_filters('user_'.$name.'_label', $desc); ?></label></th>
     275    <td><input type="text" name="<?php echo $name; ?>" id="<?php echo $name; ?>" value="<?php echo esc_attr($profileuser->$name) ?>" class="regular-text" /></td>
     276</tr>   
     277<?php
     278    }
     279?>
    284280</table>
    285281
Note: See TracChangeset for help on using the changeset viewer.