Automattic\WooCommerce\Blocks\Assets
AssetDataRegistry::initialize_core_data() protected WC 1.0
Used for on demand initialization of asset data and registering it with the internal data registry.
Note: core data will overwrite any externally registered data via the api.
{} Это метод класса: AssetDataRegistry{}
Хуки из метода
Возвращает
null
. Null. Ничего.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->initialize_core_data();
Код AssetDataRegistry::initialize_core_data() AssetDataRegistry::initialize core data WC 5.1.0
protected function initialize_core_data() {
/**
* Low level hook for registration of new data late in the cycle.
*
* Developers, do not use this hook as it is likely to be removed.
* Instead, use the data api:
* Automattic\WooCommerce\Blocks\Package::container()
* ->get( Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry::class )
* ->add( $key, $value )
*/
$settings = apply_filters(
'woocommerce_shared_settings',
$this->data
);
// note this WILL wipe any data already registered to these keys because
// they are protected.
$this->data = array_replace_recursive( $settings, $this->get_core_data() );
}