287 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Won a competition
  • Has sold $125,000+ on Envato Market
  • Has referred 100+ members
+9 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.

446 posts here for love
  • Has sold $125,000+ on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Won a competition
  • Sells items exclusively on Envato Market
+7 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.

1503 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
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 :)
722 posts
  • Has been part of the Envato Community for over 2 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+1 more
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.

446 posts here for love
  • Has sold $125,000+ on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Won a competition
  • Sells items exclusively on Envato Market
+7 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

1088 posts
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
  • Sells items exclusively on Envato Market
+6 more
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.

316 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Made it to the Authors' Hall of Fame
  • Had an item featured in an Envato Bundle
+5 more
halfdata 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.

1088 posts
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
  • Sells items exclusively on Envato Market
+6 more
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?

1088 posts
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
  • Sells items exclusively on Envato Market
+6 more
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.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by