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

Load Linky resources only on Linky page

$
0
0

Replies: 0

Hi

Thanks for this lovely plugin!

I noticed that the script for the plugin is being loaded on all pages of the site. As we’re trying to optimise for speed, it would be great if the scripts were only loaded on the Linky page.

To achieve this we’ve taken the liberty to do some changes in linky/src/Linky.php:

We’ve moved everything in public function linkyPluginEnqueue() inside if(!empty(get_query_var( 'is_linky' ))). That appears to do the trick.

But maybe that is something you could implement.

Thanks for you support!

  • This topic was modified 38 minutes ago by phphphph.

Viewing all articles
Browse latest Browse all 59525

Trending Articles