WP_Theme_JSON::get_custom_css(): string

In this article

Returns the global styles custom CSS.

Return

string The global styles custom CSS.

Source

			// If the part contains braces, it's a nested CSS rule.
			$part = explode( '{', str_replace( '}', '', $part ) );
			if ( count( $part ) !== 2 ) {
				continue;
			}
			$nested_selector = $part[0];
			$css_value       = $part[1];
			$part_selector   = str_starts_with( $nested_selector, ' ' )
				? static::scope_selector( $selector, $nested_selector )
				: static::append_to_selector( $selector, $nested_selector );
			$processed_css  .= $part_selector . '{' . trim( $css_value ) . '}';
		}
	}
	return $processed_css;
}

/**

Changelog

VersionDescription
6.2.0Introduced.

User Contributed Notes

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