Make WordPress Core


Ignore:
Timestamp:
08/10/2012 03:36:54 PM (13 years ago)
Author:
ryan
Message:

Allow passing stdClass and WP_User to wp_insert_user() and wp_update_user(). Introduce WP_User::to_array(). Eliminate uses of get_object_vars() when passing to wp_*_user(). fixes #21429

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r21485 r21496  
    664664    function has_prop( $key ) {
    665665        return $this->__isset( $key );
     666    }
     667
     668    /*
     669     * Return an array representation.
     670     *
     671     * @since 3.5.0
     672     *
     673     * @return array Array representation.
     674     */
     675    function to_array() {
     676        return get_object_vars( $this->data );
    666677    }
    667678
Note: See TracChangeset for help on using the changeset viewer.