Make WordPress Core

Changeset 18506


Ignore:
Timestamp:
08/04/2011 03:42:38 PM (13 years ago)
Author:
ryan
Message:

Handle deprecation of id in set(). Props scribu. see #15458

File:
1 edited

Legend:

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

    r18504 r18506  
    508508     */
    509509    function __set( $key, $value ) {
     510        if ( 'id' == $key ) {
     511            _deprecated_argument( 'WP_User->id', '2.1', __( 'Use <code>WP_User->ID</code> instead.' ) );
     512            $this->ID = $value;
     513            return;
     514        }
     515
    510516        $this->data->$key = $value;
    511517    }
Note: See TracChangeset for help on using the changeset viewer.