Download the PHP package kaiseki/wp-dequeue-assets without Composer
On this page you can find all versions of the php package kaiseki/wp-dequeue-assets. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kaiseki/wp-dequeue-assets
More information about kaiseki/wp-dequeue-assets
Files in kaiseki/wp-dequeue-assets
Package wp-dequeue-assets
Short Description Conditionally dequeue and deregister WordPress scripts and styles using context filters
License MIT
Homepage https://github.com/kaisekidev/kaiseki-wp-dequeue-assets
Informations about the package wp-dequeue-assets
kaiseki/wp-dequeue-assets
Conditionally dequeue and deregister WordPress scripts and styles using context filters.
A kaiseki/wp-hook HookProviderInterface wired through ConfigProvider: list the script/style
handles you want gone and, optionally, the condition under which to remove them. A condition is either
true (always, on the front end) or a kaiseki/wp-context ContextFilterInterface — given as an
instance, a class-string resolved from the container, or a list of filters combined into a
ContextFilterPipeline — so you can scope removal to specific templates, post types, etc.
Installation
Requires PHP 8.2 or newer.
Usage
Register ConfigProvider with your laminas-style config aggregator and configure the
dequeue_assets key:
ConfigProvider registers DequeueAssetsFactory, which reads the dequeue_assets config and resolves
each context filter (or list of filters, combined into a ContextFilterPipeline) from the container.
Removal runs on wp_enqueue_scripts and wp_footer (priority 999) and is skipped in the admin.
Development
License
MIT — see LICENSE.
All versions of wp-dequeue-assets with dependencies
kaiseki/config Version ^2.0
kaiseki/wp-context Version ^1.0
kaiseki/wp-hook Version ^2.0
psr/container Version ^1.1 || ^2.0