WP_Style_Engine_Processor::add_storepublicWP 6.1.0

Adds a store to the processor.

Method of the class: WP_Style_Engine_Processor{}

No Hooks.

Returns

WP_Style_Engine_Processor. Returns the object to allow chaining methods.

Usage

$WP_Style_Engine_Processor = new WP_Style_Engine_Processor();
$WP_Style_Engine_Processor->add_store( $store );
$store(WP_Style_Engine_CSS_Rules_Store) (required)
The store to add.

Changelog

Since 6.1.0 Introduced.

WP_Style_Engine_Processor::add_store() code WP 6.8.1

public function add_store( $store ) {
	if ( ! $store instanceof WP_Style_Engine_CSS_Rules_Store ) {
		_doing_it_wrong(
			__METHOD__,
			__( '$store must be an instance of WP_Style_Engine_CSS_Rules_Store' ),
			'6.1.0'
		);
		return $this;
	}

	$this->stores[ $store->get_name() ] = $store;

	return $this;
}