Changeset 11784 for trunk/wp-admin/includes/user.php
- Timestamp:
- 08/06/2009 09:59:52 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/user.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/user.php
r11571 r11784 106 106 if ( isset( $_POST['description'] )) 107 107 $user->description = trim( $_POST['description'] ); 108 if ( isset( $_POST['jabber'] )) 109 $user->jabber = esc_html( trim( $_POST['jabber'] )); 110 if ( isset( $_POST['aim'] )) 111 $user->aim = esc_html( trim( $_POST['aim'] )); 112 if ( isset( $_POST['yim'] )) 113 $user->yim = esc_html( trim( $_POST['yim'] )); 108 $user_contactmethods = _wp_get_user_contactmethods(); 109 foreach ($user_contactmethods as $method => $name) { 110 if ( isset( $_POST[$method] )) 111 $user->$method = esc_html( trim( $_POST[$method] ) ); 112 } 114 113 if ( !$update ) 115 114 $user->rich_editing = 'true'; // Default to true for new users. … … 379 378 $user->display_name = esc_attr($user->display_name); 380 379 $user->nickname = esc_attr($user->nickname); 381 $user->aim = isset( $user->aim ) && !empty( $user->aim ) ? esc_attr($user->aim) : ''; 382 $user->yim = isset( $user->yim ) && !empty( $user->yim ) ? esc_attr($user->yim) : ''; 383 $user->jabber = isset( $user->jabber ) && !empty( $user->jabber ) ? esc_attr($user->jabber) : ''; 380 381 $user_contactmethods = _wp_get_user_contactmethods(); 382 foreach ($user_contactmethods as $method => $name) { 383 $user->{$method} = isset( $user->{$method} ) && !empty( $user->{$method} ) ? esc_attr($user->{$method}) : ''; 384 } 385 384 386 $user->description = isset( $user->description ) && !empty( $user->description ) ? esc_html($user->description) : ''; 385 387 … … 836 838 } 837 839 840 /** 841 * Setup the default contact methods 842 * 843 * @access private 844 * @since 845 * 846 * @return array $user_contactmethods Array of contact methods and their labels. 847 */ 848 function _wp_get_user_contactmethods() { 849 $user_contactmethods = array( 850 'aim' => __('AIM'), 851 'yim' => __('Yahoo IM'), 852 'jabber' => __('Jabber / Google Talk') 853 ); 854 return apply_filters('user_contactmethods',$user_contactmethods); 855 } 856 838 857 ?>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)