287 posts
  • Elite Author
  • Won a Competition
  • Argentina
  • Sold between 100 000 and 250 000 dollars
  • Author had a Free File of the Month
  • Most Wanted Bounty Winner
  • Bought between 50 and 99 items
  • Referred between 100 and 199 users
+3 more
DPereyra says
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.

433 posts here for love
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Has been a member for 1-2 years
  • India
  • Won a Competition
  • Exclusive Author
  • Envato Studio (Microlancer) Beta Tester
+2 more
nCrafts says

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.

1454 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says


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.
Wrong, you can have wp_enqueue_script(“jquery”) 1000 times, only once will jQuery be called, that’s the beauty of it :)
605 posts
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Has been a member for 2-3 years
  • Referred between 1 and 9 users
  • Sold between 10 000 and 50 000 dollars
Typps says

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.

433 posts here for love
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Has been a member for 1-2 years
  • India
  • Won a Competition
  • Exclusive Author
  • Envato Studio (Microlancer) Beta Tester
+2 more
nCrafts says



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.
Wrong, you can have wp_enqueue_script(“jquery”) 1000 times, only once will jQuery be called, that’s the beauty of it :)

Yes, found out :D

901 posts
  • Author had a Free File of the Month
  • Grew a moustache for the Envato Movember competition
  • Sold between 10 000 and 50 000 dollars
  • Beta Tester
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Bought between 50 and 99 items
  • Referred between 1 and 9 users
  • Has been a member for 1-2 years
greenline says
That’s the way I was using it in my plugin: 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.

195 posts
  • Elite Author
  • Author had a File in an Envato Bundle
  • Sold between 100 000 and 250 000 dollars
  • Referred between 200 and 499 users
  • Exclusive Author
  • Bought between 1 and 9 items
  • Has been a member for 2-3 years
  • Europe
ichurakov says

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.

901 posts
  • Author had a Free File of the Month
  • Grew a moustache for the Envato Movember competition
  • Sold between 10 000 and 50 000 dollars
  • Beta Tester
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Bought between 50 and 99 items
  • Referred between 1 and 9 users
  • Has been a member for 1-2 years
greenline says

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?

901 posts
  • Author had a Free File of the Month
  • Grew a moustache for the Envato Movember competition
  • Sold between 10 000 and 50 000 dollars
  • Beta Tester
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Bought between 50 and 99 items
  • Referred between 1 and 9 users
  • Has been a member for 1-2 years
greenline says

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.

by
by
by
by
by
by