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

wp_maybe_grant_resume_extensions_caps() WP 5.2.0

Filters the user capabilities to grant the 'resume_plugins' and 'resume_themes' capabilities as necessary.

Хуков нет.

Возвращает

true/false[]. Filtered array of the user's capabilities.

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

wp_maybe_grant_resume_extensions_caps( $allcaps );
$allcaps(true/false[]) (обязательный)
An array of all the user's capabilities.

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

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

Код wp maybe grant resume extensions caps: wp-includes/capabilities.php WP 5.5.1

<?php
function wp_maybe_grant_resume_extensions_caps( $allcaps ) {
	// Even in a multisite, regular administrators should be able to resume plugins.
	if ( ! empty( $allcaps['activate_plugins'] ) ) {
		$allcaps['resume_plugins'] = true;
	}

	// Even in a multisite, regular administrators should be able to resume themes.
	if ( ! empty( $allcaps['switch_themes'] ) ) {
		$allcaps['resume_themes'] = true;
	}

	return $allcaps;
}