WP_Style_Engine_CSS_Rules_Store::get_store()public staticWP 6.1.0

Gets an instance of the store.

{} It's a method of the class: WP_Style_Engine_CSS_Rules_Store{}

No Hooks.

Return

WP_Style_Engine_CSS_Rules_Store|null.

Usage

$result = WP_Style_Engine_CSS_Rules_Store::get_store( $store_name );
$store_name(string)
The name of the store.
Default: 'default'

Changelog

Since 6.1.0 Introduced.

Code of WP_Style_Engine_CSS_Rules_Store::get_store() WP 6.1.1

public static function get_store( $store_name = 'default' ) {
	if ( ! is_string( $store_name ) || empty( $store_name ) ) {
		return;
	}
	if ( ! isset( static::$stores[ $store_name ] ) ) {
		static::$stores[ $store_name ] = new static();
		// Set the store name.
		static::$stores[ $store_name ]->set_name( $store_name );
	}
	return static::$stores[ $store_name ];
}