is_valid_style_value example


    protected static function get_css_var_value( $style_value$css_vars ) {
        foreach ( $css_vars as $property_key => $css_var_pattern ) {
            $slug = static::get_slug_from_preset_value( $style_value$property_key );
            if ( static::is_valid_style_value( $slug ) ) {
                $var = strtr(
                    $css_var_pattern,
                    array( '$slug' => $slug )
                );
                return "var($var)";
            }
        }
        return '';
    }

    /** * Util: Checks whether an incoming block style value is valid. * * @since 6.1.0 * * @param string $style_value A single CSS preset value. * @return bool */
Home | Imprint | This part of the site doesn't use cookies.