src/wp-includes/class-wp-customize-section.php 1 location
|
@@ 250-260 (lines=11) @@
|
| 247 |
|
* |
| 248 |
|
* @return bool False if theme doesn't support the section or user doesn't have the capability. |
| 249 |
|
*/ |
| 250 |
|
final public function check_capabilities() { |
| 251 |
|
if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) ) { |
| 252 |
|
return false; |
| 253 |
|
} |
| 254 |
|
|
| 255 |
|
if ( $this->theme_supports && ! call_user_func_array( 'current_theme_supports', (array) $this->theme_supports ) ) { |
| 256 |
|
return false; |
| 257 |
|
} |
| 258 |
|
|
| 259 |
|
return true; |
| 260 |
|
} |
| 261 |
|
|
| 262 |
|
/** |
| 263 |
|
* Get the section's content for insertion into the Customizer pane. |
src/wp-includes/class-wp-customize-panel.php 1 location
|
@@ 233-243 (lines=11) @@
|
| 230 |
|
* |
| 231 |
|
* @return bool False if theme doesn't support the panel or the user doesn't have the capability. |
| 232 |
|
*/ |
| 233 |
|
final public function check_capabilities() { |
| 234 |
|
if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) ) { |
| 235 |
|
return false; |
| 236 |
|
} |
| 237 |
|
|
| 238 |
|
if ( $this->theme_supports && ! call_user_func_array( 'current_theme_supports', (array) $this->theme_supports ) ) { |
| 239 |
|
return false; |
| 240 |
|
} |
| 241 |
|
|
| 242 |
|
return true; |
| 243 |
|
} |
| 244 |
|
|
| 245 |
|
/** |
| 246 |
|
* Get the panel's content template for insertion into the Customizer pane. |
src/wp-includes/class-wp-customize-setting.php 1 location
|
@@ 694-702 (lines=9) @@
|
| 691 |
|
* |
| 692 |
|
* @return bool False if theme doesn't support the setting or user can't change setting, otherwise true. |
| 693 |
|
*/ |
| 694 |
|
final public function check_capabilities() { |
| 695 |
|
if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) ) |
| 696 |
|
return false; |
| 697 |
|
|
| 698 |
|
if ( $this->theme_supports && ! call_user_func_array( 'current_theme_supports', (array) $this->theme_supports ) ) |
| 699 |
|
return false; |
| 700 |
|
|
| 701 |
|
return true; |
| 702 |
|
} |
| 703 |
|
|
| 704 |
|
/** |
| 705 |
|
* Multidimensional helper function. |