WordPress.org

Make WordPress Core

Changeset 31147


Ignore:
Timestamp:
01/11/2015 10:23:00 PM (5 years ago)
Author:
wonderboymusic
Message:

In WP_Roles, only allow __call() to run against ->_init().

See #30891.

File:
1 edited

Legend:

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

    r31127 r31147  
    9191     */
    9292    public function __call( $name, $arguments ) {
    93         return call_user_func_array( array( $this, $name ), $arguments );
     93        if ( '_init' === $name ) {
     94            return call_user_func_array( array( $this, $name ), $arguments );
     95        }
     96        return false;
    9497    }
    9598
Note: See TracChangeset for help on using the changeset viewer.