WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Customize_Partial::check_capabilities() public WP 4.5.0

Checks if the user can refresh this partial.

Returns false if the user cannot manipulate one of the associated settings, or if one of the associated settings does not exist.

Это метод класса: WP_Customize_Partial{}

Хуков нет.

Возвращает

true/false. False if user can't edit one of the related settings, or if one of the associated settings does not exist.

Использование

$WP_Customize_Partial = new WP_Customize_Partial();
$WP_Customize_Partial->check_capabilities();

Список изменений

С версии 4.5.0 Введена.

Код WP_Customize_Partial::check_capabilities() WP 5.5.1

wp-includes/customize/class-wp-customize-partial.php
<?php
final public function check_capabilities() {
	if ( ! empty( $this->capability ) && ! current_user_can( $this->capability ) ) {
		return false;
	}
	foreach ( $this->settings as $setting_id ) {
		$setting = $this->component->manager->get_setting( $setting_id );
		if ( ! $setting || ! $setting->check_capabilities() ) {
			return false;
		}
	}
	return true;
}