equal
deleted
inserted
replaced
96 // NOTE: The following is a workaround for an inability to treat (and thus label) a list of sections as a whole. |
96 // NOTE: The following is a workaround for an inability to treat (and thus label) a list of sections as a whole. |
97 ?> |
97 ?> |
98 <li class="customize-control-title customize-section-title-nav_menus-heading"><?php _e( 'Menus' ); ?></li> |
98 <li class="customize-control-title customize-section-title-nav_menus-heading"><?php _e( 'Menus' ); ?></li> |
99 <?php |
99 <?php |
100 } |
100 } |
|
101 |
|
102 /** |
|
103 * Checks required user capabilities and whether the theme has the |
|
104 * feature support required by the panel. |
|
105 * |
|
106 * @since 5.9.0 |
|
107 * |
|
108 * @return bool False if theme doesn't support the panel or the user doesn't have the capability. |
|
109 */ |
|
110 public function check_capabilities() { |
|
111 /* |
|
112 * WP_Customize_Panel::$theme_supports only supports checking one |
|
113 * theme_supports, so instead we override check_capabilities(). |
|
114 */ |
|
115 if ( |
|
116 ! current_theme_supports( 'menus' ) && |
|
117 ! current_theme_supports( 'widgets' ) |
|
118 ) { |
|
119 return false; |
|
120 } |
|
121 |
|
122 return parent::check_capabilities(); |
|
123 } |
101 } |
124 } |