From 5b6858eff8c7a49fd26857ee0a1b8547e752e796 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sun, 11 Jan 2015 22:23:00 +0000 Subject: [PATCH] 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 --- src/wp-includes/capabilities.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/capabilities.php b/src/wp-includes/capabilities.php index 94ba9dcbc2..160c20e89e 100644 --- a/src/wp-includes/capabilities.php +++ b/src/wp-includes/capabilities.php @@ -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; } /**