Automattic\WooCommerce\Blocks
AssetsController::get_block_asset_resource_hints_cache
Get the block asset resource hints in the cache or null if not found.
Метод класса: AssetsController{}
Хуков нет.
Возвращает
Массив|null. Array of resource hints.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_block_asset_resource_hints_cache();
Код AssetsController::get_block_asset_resource_hints_cache() AssetsController::get block asset resource hints cache WC 10.5.0
private function get_block_asset_resource_hints_cache() {
if ( wp_is_development_mode( 'plugin' ) ) {
return null;
}
$cache = get_transient( 'woocommerce_block_asset_resource_hints' );
$current_version = array(
'woocommerce' => Constants::get_constant( 'WC_VERSION' ),
'wordpress' => get_bloginfo( 'version' ),
'site_url' => site_url(),
);
if ( isset( $cache['version'] ) && $cache['version'] === $current_version ) {
return $cache['files'];
}
return null;
}