diff --git a/wp-includes/class-wp-customize-section.php b/wp-includes/class-wp-customize-section.php index 772351e76..478bc29dd 100644 --- a/wp-includes/class-wp-customize-section.php +++ b/wp-includes/class-wp-customize-section.php @@ -46,10 +46,10 @@ class WP_Customize_Section { * @return bool False if theme doesn't support the section or user doesn't have the capability. */ function check_capabilities() { - if ( ! $this->capability || ! current_user_can( $this->capability ) ) + if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) ) return false; - if ( $this->theme_supports && ! current_theme_supports( $this->theme_supports ) ) + if ( $this->theme_supports && ! call_user_func_array( 'current_theme_supports', (array) $this->theme_supports ) ) return false; return true; diff --git a/wp-includes/class-wp-customize-setting.php b/wp-includes/class-wp-customize-setting.php index b01a13fcb..82369d7a6 100644 --- a/wp-includes/class-wp-customize-setting.php +++ b/wp-includes/class-wp-customize-setting.php @@ -267,10 +267,10 @@ class WP_Customize_Setting { public final function check_capabilities() { global $customize; - if ( ! $this->capability || ! current_user_can( $this->capability ) ) + if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) ) return false; - if ( $this->theme_supports && ! current_theme_supports( $this->theme_supports ) ) + if ( $this->theme_supports && ! call_user_func_array( 'current_theme_supports', (array) $this->theme_supports ) ) return false; $section = $customize->get_section( $this->section );