Exclude user role from access control in All in One SEO

Exclude user role from access control in All in One SEO on child sites.

Snippet Type

Execute on Child Sites

Snippet

add_filter( 'aioseo_access_control_excluded_roles', 'aioseo_filter_access_control_excluded_roles' );
function aioseo_filter_access_control_excluded_roles( $roles ) {
	if ( ( $key = array_search( 'shop_manager', $roles ) ) !== false ) {
		unset( $roles[ $key ] );
	}
	return $roles;
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.