wp_maybe_grant_resume_extensions_caps

Advertisement

Summery Summery

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

Syntax Syntax

wp_maybe_grant_resume_extensions_caps( bool[] $allcaps )

Parameters Parameters

$allcaps

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

Return Return

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

Source Source

File: wp-includes/capabilities.php

	 *
	 * @since 3.0.0
	 *
	 * @param int $user_id ID of the user Super Admin privileges are being revoked from.
	 */
	do_action( 'revoke_super_admin', $user_id );

	// Directly fetch site_admins instead of using get_super_admins().
	$super_admins = get_site_option( 'site_admins', array( 'admin' ) );

	$user = get_userdata( $user_id );
	if ( $user && 0 !== strcasecmp( $user->user_email, get_site_option( 'admin_email' ) ) ) {
		$key = array_search( $user->user_login, $super_admins, true );

Advertisement

Changelog Changelog

Changelog
Version Description
5.2.0 Introduced.

Advertisement

Leave a Reply