trendwerk / skip-bundled
Skip scripts bundled in your WordPress theme.
Installs: 81
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:Shell
Requires (Dev)
This package is auto-updated.
Last update: 2024-11-26 20:54:01 UTC
README
Skip parsing of scripts bundled in your WordPress theme. This is useful when you bundle scripts (like jQuery) that are also used and added to the queue through wp_enqueue_script
by WordPress plugins in one file.
Install
composer require trendwerk/skip-bundled
Usage
$scripts = new \Trendwerk\SkipBundled\Scripts(); $scripts->init(); $scripts->add($handle);
Where $handle
is the handle on which the script is registered in WordPress, by using wp_register_script
.
Example
An example for jQuery:
$scripts = new \Trendwerk\SkipBundled\Scripts(); $scripts->init(); $scripts->add('jquery-core');
Note: jQuery is registered as jquery-core
.