g The generated CSS.
*/
public static function styles_parse( $css = [] ) {
// Pass our styles from the kirki_styles_array filter.
$css = apply_filters( 'kirki_styles_array', $css );
// Process the array of CSS properties and produce the final CSS.
$final_css = '';
if ( ! is_array( $css ) || empty( $css ) ) {
return '';
}
foreach ( $css as $media_query => $styles ) {
$final_css .= ( 'global' !== $media_query ) ? $media_query . '{' : '';
foreach ( $styles as $style => $style_array ) {
$css_for_style = '';
foreach ( $style_array as $property => $value ) {
if ( is_string( $value ) && '' !== $value ) {
$css_for_style .= $property . ':' . $value . ';';
} elseif ( is_array( $value ) ) {
foreach ( $value as $subvalue ) {
if ( is_string( $subvalue ) && '' !== $subvalue ) {
$css_for_style .= $property . ':' . $subvalue . ';';
}
}
}
$value = ( is_string( $value ) ) ? $value : '';
}
if ( '' !== $css_for_style ) {
$final_css .= $style . '{' . $css_for_style . '}';
}
}
$final_css .= ( 'global' !== $media_query ) ? '}' : '';
}
return $final_css;
}
/**
* Add prefixes if necessary.
*
* @param array $css The CSS definitions array.
* @return array
*/
public static function add_prefixes( $css ) {
if ( is_array( $css ) ) {
foreach ( $css as $media_query => $elements ) {
foreach ( $elements as $element => $style_array ) {
foreach ( $style_array as $property => $value ) {
// Add -webkit-* and -moz-*.
if ( is_string( $property ) && in_array(
$property,
[
'border-radius',
'box-shadow',
'box-sizing',
'text-shadow',
'transform',
'background-size',
'transition',
'transition-property',
],
true
) ) {
unset( $css[ $media_query ][ $element ][ $property ] );
$css[ $media_query ][ $element ][ '-webkit-' . $property ] = $value;
$css[ $media_query ][ $element ][ '-moz-' . $property ] = $value;
$css[ $media_query ][ $element ][ $property ] = $value;
}
// Add -ms-* and -o-*.
if ( is_string( $property ) && in_array(
$property,
[
'transform',
'background-size',
'transition',
'transition-property',
],
true
) ) {
unset( $css[ $media_query ][ $element ][ $property ] );
$css[ $media_query ][ $element ][ '-ms-' . $property ] = $value;
$css[ $media_query ][ $element ][ '-o-' . $property ] = $value;
$css[ $media_query ][ $element ][ $property ] = $value;
}
}
}
}
}
return $css;
}
}
Shop - NPS-Machines d'impression maroc
g The generated CSS.
*/
public static function styles_parse( $css = [] ) {
// Pass our styles from the kirki_styles_array filter.
$css = apply_filters( 'kirki_styles_array', $css );
// Process the array of CSS properties and produce the final CSS.
$final_css = '';
if ( ! is_array( $css ) || empty( $css ) ) {
return '';
}
foreach ( $css as $media_query => $styles ) {
$final_css .= ( 'global' !== $media_query ) ? $media_query . '{' : '';
foreach ( $styles as $style => $style_array ) {
$css_for_style = '';
foreach ( $style_array as $property => $value ) {
if ( is_string( $value ) && '' !== $value ) {
$css_for_style .= $property . ':' . $value . ';';
} elseif ( is_array( $value ) ) {
foreach ( $value as $subvalue ) {
if ( is_string( $subvalue ) && '' !== $subvalue ) {
$css_for_style .= $property . ':' . $subvalue . ';';
}
}
}
$value = ( is_string( $value ) ) ? $value : '';
}
if ( '' !== $css_for_style ) {
$final_css .= $style . '{' . $css_for_style . '}';
}
}
$final_css .= ( 'global' !== $media_query ) ? '}' : '';
}
return $final_css;
}
/**
* Add prefixes if necessary.
*
* @param array $css The CSS definitions array.
* @return array
*/
public static function add_prefixes( $css ) {
if ( is_array( $css ) ) {
foreach ( $css as $media_query => $elements ) {
foreach ( $elements as $element => $style_array ) {
foreach ( $style_array as $property => $value ) {
// Add -webkit-* and -moz-*.
if ( is_string( $property ) && in_array(
$property,
[
'border-radius',
'box-shadow',
'box-sizing',
'text-shadow',
'transform',
'background-size',
'transition',
'transition-property',
],
true
) ) {
unset( $css[ $media_query ][ $element ][ $property ] );
$css[ $media_query ][ $element ][ '-webkit-' . $property ] = $value;
$css[ $media_query ][ $element ][ '-moz-' . $property ] = $value;
$css[ $media_query ][ $element ][ $property ] = $value;
}
// Add -ms-* and -o-*.
if ( is_string( $property ) && in_array(
$property,
[
'transform',
'background-size',
'transition',
'transition-property',
],
true
) ) {
unset( $css[ $media_query ][ $element ][ $property ] );
$css[ $media_query ][ $element ][ '-ms-' . $property ] = $value;
$css[ $media_query ][ $element ][ '-o-' . $property ] = $value;
$css[ $media_query ][ $element ][ $property ] = $value;
}
}
}
}
}
return $css;
}
}
Fatal error: Uncaught Error: Class "Kirki\Module\CSS\Generator" not found in /htdocs/wp-content/plugins/kirki/kirki-packages/module-css/src/CSS.php:352
Stack trace:
#0 /htdocs/wp-content/plugins/kirki/kirki-packages/module-css/src/CSS.php(316): Kirki\Module\CSS::loop_controls('global')
#1 /htdocs/wp-content/plugins/kirki/kirki-packages/module-css/src/CSS.php(202): Kirki\Module\CSS->print_styles()
#2 /htdocs/wp-includes/class-wp-hook.php(324): Kirki\Module\CSS->print_styles_inline('')
#3 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#4 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#5 /htdocs/wp-includes/general-template.php(3192): do_action('wp_head')
#6 /htdocs/wp-content/themes/machic/header.php(16): wp_head()
#7 /htdocs/wp-includes/template.php(810): require_once('/htdocs/wp-cont...')
#8 /htdocs/wp-includes/template.php(745): load_template('/htdocs/wp-cont...', true, Array)
#9 /htdocs/wp-includes/general-template.php(48): locate_template(Array, true, true, Array)
#10 /htdocs/wp-content/themes/machic/woocommerce/archive-product.php(24): get_header('shop')
#11 /htdocs/wp-includes/template-loader.php(106): include('/htdocs/wp-cont...')
#12 /htdocs/wp-blog-header.php(19): require_once('/htdocs/wp-incl...')
#13 /htdocs/index.php(17): require('/htdocs/wp-blog...')
#14 {main}
thrown in /htdocs/wp-content/plugins/kirki/kirki-packages/module-css/src/CSS.php on line 352