wp_maybe_grant_resume_extensions_caps( bool[] $allcaps )

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


Description Description


Parameters Parameters

$allcaps

(bool[]) (Required) An array of all the user's capabilities.


Top ↑

Return Return

(bool[]) Filtered array of the user's capabilities.


Top ↑

Source Source

File: wp-includes/capabilities.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;
}

Top ↑

Changelog Changelog

Changelog
Version Description
5.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.