WP_Style_Engine_CSS_Rules_Store::get_store()public staticWP 6.1.0

Gets an instance of the store.

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.

WP_Style_Engine_CSS_Rules_Store::get_store() code WP 6.5.2

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 ];
}