WP_Style_Engine_CSS_Rules_Store::get_store( string $store_name = ‘default’ ): WP_Style_Engine_CSS_Rules_Store|void

In this article

Gets an instance of the store.

Parameters

$store_namestringoptional
The name of the store.

Default:'default'

Return

WP_Style_Engine_CSS_Rules_Store|void

Source

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

Changelog

VersionDescription
6.1.0Introduced.

User Contributed Notes

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