Yes I’m doing something similar: I’m building a plugin and I’m loading some plugin specific Javascript via Modernizr.load
. It’s fairly much Javascript and I don’t want to slow down page load times. I currently don’t intend to load jQuery in this manner though.
Assume that I did load jQuery via Modernizr. Then what happens if someone activates both your plugin, and my plugin? Might we then load jQuery, twice? (Perhaps we’d load jQuery 1.7.2 once via require.js and once via Modernizr? I don’t know how these script loaders work, internally.)
I guess that if you load only stuff that you really really know is specific to your plugin only, then you’ll be fine.
(Danger: This is my first WordPress plugin and I don’t know WordPress or PHP well.)
Related Posts:
- How do I only load a plugin js on it’s settings pages?
- AJAX Call Via Vanilla JavaScript In WordPress Plugin Development
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- How to Reload the Dashboard After Clicking Update in Quick-Edit?
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- Dequeue / Deregister script and replace it with a new plugin
- Insert code after tag without using functions.php?
- How do I use WordPress PHP functions in my Javascript code?
- Passing select control value to block
- How to create popup same as wordpress popup feature
- Passing RichText attributes to function onChange
- How do I store information in a dynamic block in WordPress?
- How to load plugin after page is loaded – pagespeed issues
- Get IDs of Images from Gallery Block in InnerBlocks of a Custom Gutenberg Block
- React JSX in WordPress Plugin Development
- Pulling data from custom plugin settings using PHP shortcode and Javascript
- Best approach to fetch data from wp options to js file or php file
- Updating the Drag-To-Share eXtended share URLs?
- Enqueue WordPress plugin scripts below all other JS
- How to add Internationalization in WordPress using Javascript/React?
- wp.media javascript issue with on select
- How can I remove the WordPress-Version (?ver=5.x) from my plugin
- Redirect to another page using contact form 7? [closed]
- Delay JavaScript files from loading
- How to generate an all in one WordPress New content, plugin and theme update report on a website? [closed]
- How to use custom Javascript code inside a plugin?
- how to request a script more than once in wordpress
- Set Button in PluginDocumentSettingPanel Content (WordPress Gutenberg)
- Fixed: Console.log twice in the edit function
- Cannot run script properly with my custom plugin
- Add style to body based on url
- How to properly enqueue jQuery knob on WordPress without conflict?
- Problem with wordpress has_action() function
- Multiple image selection custom widget
- Create a form and have custom menu display based on user answers?
- AJAX update fails for public/non-admin users
- WordPress ajax error 400 bad request for sending data to remote site [duplicate]
- How to use information from the database in the front-end?
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- How to pass value from WordPress to Javascript
- Javascript in plugin not working
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- Creating a user ‘add custom field’ section
- Need to hide an element depending on date and post category
- Ajax, jQuery and WordPress
- Plugin – including external javascript calling google maps
- get_option include in my adsense
- Is it possible to run javascript on plugin deactivated?
- Ajax in Plugins: returns the whole page
- Load css classes after using ajax calls
- How to create post comparison in wordpress
- How to access values from your own settings page in javascript?
- Vanilla javascript in custom gutenberg block not working
- Does a plugin’s “main” file need to be named the same as the folder containing it?
- Customizing subject in comment notification e-mails
- enqueue script only if it is not already enqueue
- Plugin child folder?
- merging an array to an existing array using add_filter
- Hidden Custom Post Type
- Is there a way to programmatically enable a plugin?
- How to include code into functions.php file via a plugin
- How can I get WordPress to save comments in markdown format?
- New databes tables with – WooCommerce – for developers [closed]
- 306 MB of wp_options occupied by WordPress SEO Plugin, is that normal? [closed]
- Perform internal redirect in WordPress?
- How to prevent plugins from loading jQuery
- Inject HTML meta tag inside wordpress tag using add_shortcode
- Add type to enqueued script inside plugin
- Automatically download, install and activate plugins that my plugin depends, how?
- How to create WordPress custom end point with multiple parameters?
- After updating the WordPress getting a syntax error in the console
- How to redirect to same page after form submission
- plugin dev – minimum base css specificity?
- Asynchronous request in wordpress
- Displaying data from another database
- Every time I de-activate a custom plugin, the site encounters a critical error
- Apply html elements in php statement
- How Can i import plugin option?
- How to Get Category Name When Export Products
- How to override any plugin file in the child theme
- Custom plugin activation error
- How to capture hidden values with Gravity Forms
- How do I stop plugins and themes from getting updated in a new plugin?
- How come W3TC is allowed to host premium code in the WordPress repo?
- Execute inline javascript in wordpress after page fully loaded
- Passing function into add_action always returns the first argument
- Paid Membership Pro displaying a user name in PHP
- Make another copy of a plugin and install it
- Creating Nested custom fields
- plugin not hooking to my custom hook
- Populate select option with JSON file
- Enahanced search for edit.php and custom post type
- How to get site homepage from plugin?
- Unable to show 4 products in a row
- WordPress Hooks : Where to place callbacks that repetitively yield the same effect?
- wordpress Ajax success doesn’t return the value
- Unable to pass arguments from plugin form to filter hook using ajax, the data is transferring via ajax but unable to pass as arguments in filter hooks
- How to update changes to multiple sites at the same time
- Why am I getting an error when requiring a file in my plugin?
- Running a function using Crown WordPress on one day a week, for example, Mondays of every week