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

See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31147 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-01-11 22:23:00 +00:00
parent 274253629f
commit 5b6858eff8

View File

@ -90,7 +90,10 @@ class WP_Roles {
* @return mixed|bool Return value of the callback, false otherwise.
*/
public function __call( $name, $arguments ) {
return call_user_func_array( array( $this, $name ), $arguments );
if ( '_init' === $name ) {
return call_user_func_array( array( $this, $name ), $arguments );
}
return false;
}
/**