WPIntell

Source evidence

Does this plugin use jQuery Smooth Scroll?

jQuery Smooth Scroll · support · 2016-08-04T17:31:00+00:00

mixedsentiment
mediumseverity
0.85relevance
4replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 23 rows with source links

17.4% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

19 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
Steven Gliebe resolved
More specifically, does it use this? https://github.com/kswedberg/jquery-smooth-scroll I assumed so at first but at a glance it appears not to be. Can you confirm? Thank you. https://wordpress.org/plugins/jquery-smooth-scroll/ No, They are different. Hi Anand, Thank you for confirming that. Is there any chance you could change the enqueue handle from jquery-smooth-scroll to jss-script? Other themes and plugins enqueue the jQuery plugin by that handle (as expected) so using that same handle creates a conflict. I believe jss-script would be more appropriate for jss-script.js. What do you think? As far as I know the handle is pretty unique and matches exactly to the plugin name. Since there is no other plugin with same name or text domain. I don’t think it will create any conflict. Do you know any plugin or theme that conflicts with it? Also why anybody will even install this plugin if the feature is already built in their theme? Thank you for the response. My themes enqueue the jQuery Smooth Scroll script: https://github.com/kswedberg/jquery-smooth-scroll . Naturally I use the handle jquery-smooth-scroll and to do otherwise would be unconventional so my hands are tied. The problem is that since your plugin also uses that handle (for enqueuing) ( https://plugins.trac.wordpress.org/browser/jquery-smooth-scroll/tags/1.4.1/jquery-smooth-scroll.php#L83 ), my theme is not able to enqueue the script that it needs to. Any theme that uses that script will not be able to enqueue it while your plugin is active. I expect that the problem would be similar for plugins that are loaded after yours. The handle should match the particular script being enqueued, which is not necessarily the plugin name. Since your script is jss-script.js, the handle of jss-script makes more sense from my perspective and would prevent issues with the very popular jQuery Smooth Scroll script. https://developer.wordpress.org/reference/functions/wp_enqueue_script/#parameters $handle (string) (Required) Name of the script. Should be unique. It shouldn’t be assumed that a theme or other plugin will enqueue the jQuery Smooth Scroll script in order to provide the same functionality as your plugin. Both should be able to work independently and they can if you change your handle to the name of your script rather than the name of your plugin, which is where the problem lies. I’ve only had one users report this as being an issue but they have a point and I thought I’d share it in case you would see it as a quick improvement for compatibility. Whatever you decide, thank you for hearing me.

Comments

4 shown
Anand Kumar 2016-08-09T16:54:00+00:00

No, They are different.

Steven Gliebe 2016-08-09T17:26:00+00:00

Hi Anand, Thank you for confirming that. Is there any chance you could change the enqueue handle from jquery-smooth-scroll to jss-script? Other themes and plugins enqueue the jQuery plugin by that handle (as expected) so using that same handle creates a conflict. I believe jss-script would be more appropriate for jss-script.js. What do you think?

Anand Kumar 2016-08-24T03:19:00+00:00

As far as I know the handle is pretty unique and matches exactly to the plugin name. Since there is no other plugin with same name or text domain. I don’t think it will create any conflict. Do you know any plugin or theme that conflicts with it? Also why anybody will even install this plugin if the feature is already built in their theme?

Steven Gliebe 2016-08-24T14:48:00+00:00

Thank you for the response. My themes enqueue the jQuery Smooth Scroll script: https://github.com/kswedberg/jquery-smooth-scroll . Naturally I use the handle jquery-smooth-scroll and to do otherwise would be unconventional so my hands are tied. The problem is that since your plugin also uses that handle (for enqueuing) ( https://plugins.trac.wordpress.org/browser/jquery-smooth-scroll/tags/1.4.1/jquery-smooth-scroll.php#L83 ), my theme is not able to enqueue the script that it needs to. Any theme that uses that script will not be able to enqueue it while your plugin is active. I expect that the problem would be similar for plugins that are loaded after yours. The handle should match the particular script being enqueued, which is not necessarily the plugin name. Since your script is jss-script.js, the handle of jss-script makes more sense from my perspective and would prevent issues with the very popular jQuery Smooth Scroll script. https://developer.wordpress.org/reference/functions/wp_enqueue_script/#parameters $handle (string) (Required) Name of the script. Should be unique. It shouldn’t be assumed that a theme or other plugin will enqueue the jQuery Smooth Scroll script in order to provide the same functionality as your plugin. Both should be able to work independently and they can if you change your handle to the name of your script rather than the name of your plugin, which is where the problem lies. I’ve only had one users report this as being an issue but they have a point and I thought I’d share it in case you would see it as a quick improvement for compatibility. Whatever you decide, thank you for hearing me.