Make WordPress Core

Ticket #44094: 44094.2.patch

File 44094.2.patch, 677 bytes (added by macbookandrew, 7 years ago)

patch as described by @yguez with inline documentation

  • src/wp-includes/class-wp-user.php

     
    167167         * @param int    $site_id Optional. The site ID to initialize for.
    168168         */
    169169        public function init( $data, $site_id = '' ) {
    170                 $this->data = $data;
     170                /**
     171                 * Filters the user data.
     172                 *
     173                 * @param  object  $data    User DB row object.
     174                 * @param  integer $site_id Optional. The site ID.
     175                 */
     176                $this->data = apply_filters( 'init_user_data', $data, $site_id );
    171177                $this->ID   = (int) $data->ID;
    172178
    173179                $this->for_site( $site_id );