- Argentina
- Sold between 50 000 and 100 000 dollars
- Author was Featured
- Author had a Free File of the Month
- Most Wanted Bounty Winner
- Bought between 50 and 99 items
- Referred between 50 and 99 users
- Microlancer Beta Tester
- Exclusive Author
wp_enqueue_script("jquery");
No “deregister”, no “register”, just the wp_enqueue_script(“jquery”) is enough, I never had a problem with it in any wp version.
DPereyra said
As ichurakov mentioned, just this:wp_enqueue_script("jquery");No “deregister”, no “register”, just the wp_enqueue_script(“jquery”) is enough, I never had a problem with it in any wp version.
Using plain enqueue will not give an error, but there is a change that the user might end up loading jQuery multiple times if he is using an assortment of plugins.
nCrafts saidWrong, you can have wp_enqueue_script(“jquery”) 1000 times, only once will jQuery be called, that’s the beauty of it
DPereyra saidUsing plain enqueue will not give an error, but there is a change that the user might end up loading jQuery multiple times if he is using an assortment of plugins.
As ichurakov mentioned, just this:wp_enqueue_script("jquery");No “deregister”, no “register”, just the wp_enqueue_script(“jquery”) is enough, I never had a problem with it in any wp version.

greenline said
Thanks for the answers… But is there any developer online who used a correct include in a plugin which was accepted on CC? Can he/she please tell us the exact way of doing this? I am still confused how should I include the jquery js at the begiing of my plugin withour breaking other plugins or the theme. Thanks
From your initial post, it appears that you are deregistering jquery to register a custom version of jquery. This can potentially break other plugins and themes. So try not to do that. Limit your deregistrations to scripts that are specific to your plugin. Jquery on the other hand is included by default in wordpress and it’s something that most plugins/themes rely on.
As already suggested, wp_enqueue_script is your friend here.
For the record, jquery not available in versions below 3.5 is not true. You can download one of the older archieves to verify, look in the following path : wp-includes\js. Probably been bundled since wp 2.6. Of course the version number of jquery will vary as the wordpress version gets older, but IMHO that is a problem best solved by the user, i.e. upgrading their version of wordpress.
OriginalEXE said
nCrafts saidWrong, you can have wp_enqueue_script(“jquery”) 1000 times, only once will jQuery be called, that’s the beauty of it
DPereyra saidUsing plain enqueue will not give an error, but there is a change that the user might end up loading jQuery multiple times if he is using an assortment of plugins.
As ichurakov mentioned, just this:wp_enqueue_script("jquery");No “deregister”, no “register”, just the wp_enqueue_script(“jquery”) is enough, I never had a problem with it in any wp version.![]()
Yes, found out 
wp_enqueue_script("jquery");
No de-register, no register, at all. I only used the above piece of code. But from rejection email, I understood that was not the correct way of including jquery, that’s why I asked. But maybe that’s the standard rejection email, so…I think I will not modify my include line.
2greenline. This is correct way of including jQuery. Just resubmit your item saying that you use WP native jQuery and not de- re- register it.
I did that and my item was accepted, thank you!
Now: how do I do that for google maps api? In a buyer’s website who uses my plugin, there is a warning saying:Warning: you have included the Google Maps API multiple times on this page. This may cause unexpected errors.And the map controls are not rendered correctly indeed.
Now, how should I check in my plugin if there is a http://maps.googleapis.com/maps/api/... already included?
And what if there is version included by another plugin, but I want to use the latest google map api? How do I do that without breaking another plugins?
One more thing: I want to create a user (in my wordpress live preview website) and I want to give this user the permission to see only a plugin’s settings admin page (without access to editing any other thing in the wordpress admin panel). How do I do that?
The purpose is to allow them to see live the plugin’s back-end settings before buying.
