aturation level. */ // phpcs:ignore $saturation = apply_filters('twentynineteen_custom_colors_saturation', 100); $saturation = absint($saturation) . '%'; /** * Filters Twenty Nineteen default lightness level. * * @since Twenty Nineteen 1.0 * * @param int $lightness Color lightness level. */ // phpcs:ignore $lightness = apply_filters('twentynineteen_custom_colors_lightness', 33); $lightness = absint($lightness) . '%'; $css = 'body, .editor-styles-wrapper { --wp--preset--color--foreground: #111; --wp--preset--color--primary: hsl( ' . $primary . ', ' . $saturation . ', ' . $lightness . ' ); --wp--preset--color--secondary: #767676; --wp--preset--color--tertiary: #f7f7f7; }'; }//end if // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents $content = file_get_contents(EXTENDIFY_PATH . 'public/build/extendify-utilities.css'); $version = Config::$environment === 'PRODUCTION' ? Config::$version : uniqid(); \wp_register_style(Config::$slug . '-utilities', false, [], $version); \wp_enqueue_style(Config::$slug . '-utilities'); \wp_add_inline_style(Config::$slug . '-utilities', $content . $css); // Adds inline to the live preview. \wp_add_inline_style('wp-components', $content . $css); } }