WP_Customize_Nav_Menus_Panel::check_capabilities() – Checks required user capabilities and whether the theme has the feature support required by the panel.

You appear to be a bot. Output may be restricted

Description

Checks required user capabilities and whether the theme has the feature support required by the panel.

Usage

$bool = WP_Customize_Nav_Menus_Panel::check_capabilities();

Parameters

Returns

bool False if theme doesn't support the panel or the user doesn't have the capability.

Source

File name: wordpress/wp-includes/customize/class-wp-customize-nav-menus-panel.php


Lines:

1 to 15 of 15
  public function check_capabilities() {
    /*
		 * WP_Customize_Panel::$theme_supports only supports checking one
		 * theme_supports, so instead we override check_capabilities().
		 */
    if (
      ! current_theme_supports( 'menus' ) &&
      ! current_theme_supports( 'widgets' )
    ) {
      return false;
    }

    return parent::check_capabilities();
  }
 

 View on GitHub View on Trac