WP_Customize_Nav_Menus_Panel::check_capabilities()
Checks required user capabilities and whether the theme has the feature support required by the panel.
{} It's a method of the class: WP_Customize_Nav_Menus_Panel{}
No Hooks.
Return
true|false
. False if theme doesn't support the panel or the user doesn't have the capability.
Usage
$WP_Customize_Nav_Menus_Panel = new WP_Customize_Nav_Menus_Panel(); $WP_Customize_Nav_Menus_Panel->check_capabilities();
Changelog
Since 5.9.0 | Introduced. |
Code of WP_Customize_Nav_Menus_Panel::check_capabilities() WP Customize Nav Menus Panel::check capabilities WP 6.0
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(); }