Changeset 25606
- Timestamp:
- 09/24/2013 06:13:18 PM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/user.php
r25204 r25606 86 86 $user->description = trim( $_POST['description'] ); 87 87 88 foreach ( _wp_get_user_contactmethods( $user ) as $method => $name ) {88 foreach ( wp_get_user_contact_methods( $user ) as $method => $name ) { 89 89 if ( isset( $_POST[$method] )) 90 90 $user->$method = sanitize_text_field( $_POST[$method] ); -
trunk/src/wp-admin/user-edit.php
r25330 r25606 351 351 352 352 <?php 353 foreach ( _wp_get_user_contactmethods( $profileuser ) as $name => $desc) {353 foreach ( wp_get_user_contact_methods( $profileuser ) as $name => $desc ) { 354 354 ?> 355 355 <tr> -
trunk/src/wp-includes/user.php
r25392 r25606 1540 1540 function _get_additional_user_keys( $user ) { 1541 1541 $keys = array( 'first_name', 'last_name', 'nickname', 'description', 'rich_editing', 'comment_shortcuts', 'admin_color', 'use_ssl', 'show_admin_bar_front' ); 1542 return array_merge( $keys, array_keys( _wp_get_user_contactmethods( $user ) ) );1543 } 1544 1545 /** 1546 * Set up the contact methods.1542 return array_merge( $keys, array_keys( wp_get_user_contact_methods( $user ) ) ); 1543 } 1544 1545 /** 1546 * Set up the user contact methods. 1547 1547 * 1548 1548 * Default contact methods were removed in 3.6. A filter dictates contact methods. 1549 1549 * 1550 * @since 2.9.0 1551 * @access private 1552 * 1553 * @param object $user User data object (optional). 1554 * @return array $user_contactmethods Array of contact methods and their labels. 1555 */ 1556 function _wp_get_user_contactmethods( $user = null ) { 1557 $user_contactmethods = array(); 1550 * @since 3.7.0 1551 * 1552 * @param WP_User $user Optional. WP_User object. 1553 * @return array Array of contact methods and their labels. 1554 */ 1555 function wp_get_user_contact_methods( $user = null ) { 1556 $methods = array(); 1558 1557 if ( get_site_option( 'initial_db_version' ) < 23588 ) { 1559 $ user_contactmethods = array(1558 $methods = array( 1560 1559 'aim' => __( 'AIM' ), 1561 1560 'yim' => __( 'Yahoo IM' ), … … 1563 1562 ); 1564 1563 } 1565 return apply_filters( 'user_contactmethods', $user_contactmethods, $user ); 1564 1565 /** 1566 * Filter the user contact methods. 1567 * 1568 * @since 2.9.0 1569 * 1570 * @param array $methods Array of contact methods and their labels. 1571 * @param WP_User $user Optional. WP_User object. 1572 */ 1573 return apply_filters( 'user_contactmethods', $methods, $user ); 1574 } 1575 1576 /** 1577 * The old private function for setting up user contact methods. 1578 * 1579 * @since 2.9.0 1580 * @access private 1581 */ 1582 function _wp_get_user_contactmethods( $user = null ) { 1583 return wp_get_user_contact_methods( $user ); 1566 1584 } 1567 1585
Note: See TracChangeset
for help on using the changeset viewer.