Assets
This package provides automatic registration and versioning of vendor scripts and styles for use in WordPress projects. It ensures that external dependencies are loaded with the correct versions and paths, both in the editor and on the frontend.
Last modified: June 2, 2025
Features
- Registers vendor scripts and styles (e.g., Swiper, Tom Select) with correct versions.
- Integrates with WordPress script and style loading via hooks.
- Centralizes vendor version management for consistency.
- Supports automatic suffix handling for minified assets.
How It Works
The package hooks into WordPress using wp_default_scripts
and wp_default_styles
to register external assets.
Vendor versions are managed in a single constant for easy updates.
Registered Vendor Scripts
- swiper (
11.2.4
) - tom-select (
2.2.2
) - react-jsx-runtime (
18.3.1
)