Reusing JQuery Plugins /CSS in wordpress project -


i've 3rd party jquery plugins need reuse across wordpress plugins on website project. better practice put these jquery plugins inside common folder (say inside wp-content) instead of putting them inside wordpress plugin , referencing ?

i.e. instead of

 wp_enqueue_scripts('script_id', plugins_url() . '/plugin-abc/bootstrap-tagsinput.js', array('jquery'), $plugin_version, 'all'); 

^^ above apprroach creates dependencies between plugins i.e. install plugin-xyz needs bootstrap-tagsinput.js, need have plugin-abc installed first or atleast in plugins directory.

i can instead reference folder common-assets directly under wp-content

wp_enqueue_scripts('script_id', content_url() . '/common-assets/bootstrap-tagsinput.js', array('jquery'), $plugin_version, 'all'); 

always use plugin directory, way packed together.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -