Code Modernisation: Replace call_user_func_array() in wp-includes/class-wp-customize-*.php with direct function calls in combination with the spread operator.
Props jrf. See #47678. Built from https://develop.svn.wordpress.org/trunk@46133 git-svn-id: http://core.svn.wordpress.org/trunk@45945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -242,11 +242,11 @@ class WP_Customize_Section {
|
||||
* @return bool False if theme doesn't support the section or user doesn't have the capability.
|
||||
*/
|
||||
final public function check_capabilities() {
|
||||
if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) ) {
|
||||
if ( $this->capability && ! current_user_can( $this->capability ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( $this->theme_supports && ! call_user_func_array( 'current_theme_supports', (array) $this->theme_supports ) ) {
|
||||
if ( $this->theme_supports && ! current_theme_supports( ... (array) $this->theme_supports ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user