WP_Theme_JSON::process_blocks_custom_css( string $css, string $selector ): string

In this article

Processes the CSS, to apply nesting.


The CSS to process.
The selector to nest.


string The processed CSS.


 *                          - `presets`: only the classes for the presets.
 * @param string[] $origins A list of origins to include. By default it includes VALID_ORIGINS.
 * @param array    $options An array of options for now used for internal purposes only (may change without notice).
 *                          The options currently supported are 'scope' that makes sure all style are scoped to a
 *                          given selector, and root_selector which overwrites and forces a given selector to be
 *                          used on the root node.
 * @return string The resulting stylesheet.
public function get_stylesheet( $types = array( 'variables', 'styles', 'presets' ), $origins = null, $options = array() ) {
	if ( null === $origins ) {
		$origins = static::VALID_ORIGINS;



User Contributed Notes

You must log in before being able to contribute a note or feedback.