Automattic\WooCommerce\Admin\Features\ProductBlockEditor
BlockRegistry::augment_uses_context
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() BlockRegistry::augment uses context WC 10.7.0
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',
)
);
}