Warning: This class has been deprecated. This class will be removed in a future release. This has been replaced by AssetsController instead.
Assets
Assets class.
Description Description
Source Source
File: packages/woocommerce-blocks/src/Assets.php
Changelog Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |
Methods Methods
- add_theme_admin_body_class — Add theme class to admin body. — deprecated
- add_theme_body_class — Add body classes. — deprecated
- enqueue_scripts — Register the vendors style file. We need to do it after the other files because we need to check if `wp-edit-post` has been enqueued. — deprecated
- get_block_asset_build_path — Returns the appropriate asset path for loading either legacy builds or current builds.
- get_file_version — Get the file modified time as a cache buster if we're in dev mode.
- get_wc_block_data — Returns block-related data for enqueued wc-block-settings script.
- init — Initialize class features on init. — deprecated
- redirect_to_field — Adds a redirect field to the login form so blocks can redirect users after login. — deprecated
- register_assets — Register block scripts & styles. — deprecated
- register_block_script — Queues a block script in the frontend. — deprecated
- register_script — Registers a script according to `wp_register_script`, additionally loading the translations for the file.
- register_style — Registers a style according to `wp_register_style`.