WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/21/2010 03:42:06 PM (8 years ago)
Author:
nacin
Message:

Pass user object through _wp_get_user_contactmethods() to the user_contactmethods filter. props aaroncampbell, fixes #15186.

File:
1 edited

Legend:

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

    r15799 r15896  
    111111        $user->description = trim( $_POST['description'] );
    112112
    113     foreach ( _wp_get_user_contactmethods() as $method => $name ) {
     113    foreach ( _wp_get_user_contactmethods( $user ) as $method => $name ) {
    114114        if ( isset( $_POST[$method] ))
    115115            $user->$method = sanitize_text_field( $_POST[$method] );
     
    225225    $user = new WP_User( $user_id );
    226226
    227     $user_contactmethods = _wp_get_user_contactmethods();
     227    $user_contactmethods = _wp_get_user_contactmethods( $user );
    228228    foreach ($user_contactmethods as $method => $name) {
    229229        if ( empty( $user->{$method} ) )
Note: See TracChangeset for help on using the changeset viewer.