Jetpack_Custom_CSS_Enhancements::map_meta_cap PHP Method

map_meta_cap() public static method

Core, by default, restricts this to users that have unfiltered_html which would make the feature unusable in multi-site by non-super-admins, due to Core not shipping any solid sanitization. We're expanding who can use it, and then conditionally applying CSSTidy sanitization to users that do not have the unfiltered_html capability.
public static map_meta_cap ( array $caps, string $cap ) : array
$caps array Returns the user's actual capabilities.
$cap string Capability name.
return array $caps
    public static function map_meta_cap($caps, $cap)
    {
        if ('edit_css' === $cap) {
            $caps = array('edit_theme_options');
        }
        return $caps;
    }