diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index 9cdd288aa5..1948e7a794 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -1229,7 +1229,7 @@ final class WP_Customize_Manager { $widget_numbers = array_keys( $settings ); if ( count( $widget_numbers ) > 0 ) { $widget_numbers[] = 1; - $max_widget_numbers[ $id_base ] = call_user_func_array( 'max', $widget_numbers ); + $max_widget_numbers[ $id_base ] = max( ...$widget_numbers ); } else { $max_widget_numbers[ $id_base ] = 1; } diff --git a/src/wp-includes/class-wp-customize-panel.php b/src/wp-includes/class-wp-customize-panel.php index 8a227cd70d..82eda3a0f6 100644 --- a/src/wp-includes/class-wp-customize-panel.php +++ b/src/wp-includes/class-wp-customize-panel.php @@ -224,11 +224,11 @@ class WP_Customize_Panel { * @return bool False if theme doesn't support the panel or the 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; } diff --git a/src/wp-includes/class-wp-customize-section.php b/src/wp-includes/class-wp-customize-section.php index ae90127cca..26313a7401 100644 --- a/src/wp-includes/class-wp-customize-section.php +++ b/src/wp-includes/class-wp-customize-section.php @@ -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; } diff --git a/src/wp-includes/class-wp-customize-setting.php b/src/wp-includes/class-wp-customize-setting.php index 3e0a1c0770..08d5b1c348 100644 --- a/src/wp-includes/class-wp-customize-setting.php +++ b/src/wp-includes/class-wp-customize-setting.php @@ -815,11 +815,11 @@ class WP_Customize_Setting { * @return bool False if theme doesn't support the setting or user can't change setting, otherwise true. */ 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; } diff --git a/src/wp-includes/class-wp-customize-widgets.php b/src/wp-includes/class-wp-customize-widgets.php index 86cf889ee5..1a0ae316e9 100644 --- a/src/wp-includes/class-wp-customize-widgets.php +++ b/src/wp-includes/class-wp-customize-widgets.php @@ -1050,7 +1050,7 @@ final class WP_Customize_Widgets { $args[0]['before_widget_content'] = '
'; ob_start(); - call_user_func_array( 'wp_widget_control', $args ); + wp_widget_control( ...$args ); $control_tpl = ob_get_clean(); return $control_tpl; }