Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 73026

Plugin does ignore jQuery dependency

$
0
0

Replies: 0

In selection-sharer.php the script get’s added with

wp_enqueue_script( 'selection-sharer-js', plugins_url('/js/selection-sharer.js', __FILE__), false, '0.1');

But it has jQuery as a dependency so it should be

wp_enqueue_script( 'selection-sharer-js', plugins_url('/js/selection-sharer.js', __FILE__), array('jquery'), '0.1');

Also, the init script does get added right after and ignores the jQuery dependency. In my case this lead to the line being added before jQuery was loaded. An undefined error was thrown. I managed to modify the plugin to make it work in my case but this should really be fixed.


Viewing all articles
Browse latest Browse all 73026

Trending Articles