wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_maybe_grant_resume_extensions_caps › WordPress Function

Seit5.2.0
Veraltetn/v
wp_maybe_grant_resume_extensions_caps ( $allcaps )
Parameter:
  • (bool[]) $allcaps An array of all the user's capabilities.
    Erforderlich: Ja
Gibt zurück:
  • (bool[]) Filtered array of the user's capabilities.
Definiert in:
Codex:

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



Quellcode

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;
}