Automattic\WooCommerce\Admin\Features\ProductBlockEditor

BlockRegistry::augment_uses_context()privateWC 1.0

Augment the uses_context of a block by adding attributes that are used by the product editor.

Метод класса: BlockRegistry{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// private - только в коде основоного (родительского) класса
$result = $this->augment_uses_context( $uses_context );
$uses_context(массив) (обязательный)
Block uses_context.

Код BlockRegistry::augment_uses_context() WC 9.7.1

private function augment_uses_context( $uses_context ) {
	// Note: If you modify this function, also update the client-side
	// registerProductEditorBlockType function in @woocommerce/product-editor.
	return array_merge(
		isset( $uses_context ) ? $uses_context : array(),
		array(
			'postType',
		)
	);
}