WP_Theme_JSON::get_custom_css(): string

In this article

Returns the global styles custom CSS.

Return

string The global styles custom CSS.

Source

	} else {
		$types = array( 'variables', 'styles', 'presets' );
	}
}

$blocks_metadata = static::get_blocks_metadata();
$style_nodes     = static::get_style_nodes( $this->theme_json, $blocks_metadata );
$setting_nodes   = static::get_setting_nodes( $this->theme_json, $blocks_metadata );

$root_style_key    = array_search( static::ROOT_BLOCK_SELECTOR, array_column( $style_nodes, 'selector' ), true );
$root_settings_key = array_search( static::ROOT_BLOCK_SELECTOR, array_column( $setting_nodes, 'selector' ), true );

if ( ! empty( $options['scope'] ) ) {
	foreach ( $setting_nodes as &$node ) {
		$node['selector'] = static::scope_selector( $options['scope'], $node['selector'] );
	}
	foreach ( $style_nodes as &$node ) {

Changelog

VersionDescription
6.2.0Introduced.

User Contributed Notes

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