Changeset 52621
- Timestamp:
- 01/24/2022 05:32:28 AM (3 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-panel.php
r52355 r52621 233 233 * 234 234 * @since 4.0.0 235 * @since 5.9.0 Method was marked non-final. 235 236 * 236 237 * @return bool False if theme doesn't support the panel or the user doesn't have the capability. 237 238 */ 238 finalpublic function check_capabilities() {239 public function check_capabilities() { 239 240 if ( $this->capability && ! current_user_can( $this->capability ) ) { 240 241 return false; -
trunk/src/wp-includes/customize/class-wp-customize-nav-menus-panel.php
r45932 r52621 99 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 }
Note: See TracChangeset
for help on using the changeset viewer.