marky_uk
Member
Posted 7 months ago #
Hi Jeroen
I see that your plugin adds this ...
<script type='text/javascript'>
jQuery(document).ready( function() {
jQuery('#lastfmrecords').lastFmRecords(lfr_config);
});
</script>
... to the header of every page, yet I only show albums on the About Us page of our site. I know how to disable enqueue scripts (done for JQuery, etc) but not sure how to disable your code apart from on one page.
Any ideas how I can do this?
Thanks in advance!
Mark
http://wordpress.org/extend/plugins/lastfm-records/
jeroensmeets
Member
Plugin Author
Posted 7 months ago #
Mark, good point. The transition to the new shortcode setup is obviously not yet complete. Todo item for my plugin is: a page can contain the widget and/or a shortcode. Depending on the page the code needs some js and css files.
jQuery('#lastfmrecords') has length zero on pages with no widget or shortcodes, so the weight is minimal, yet can be optimized. It's on my list.
jeroensmeets
Member
Plugin Author
Posted 6 months ago #
Hi Mark,
this issue has been fixed in the new version. Unfortunately, I'm having trouble committing it to wordpress.org. Hope to have it online soon!
jeroensmeets
Member
Plugin Author
Posted 6 months ago #
Mark, the new version has been submitted to wordpress.org. WordPress will tell you about the update.
marky_uk
Member
Posted 6 months ago #
Yay, smashing ... thanks a lot for updating this ... 3 times :-) Really kind .. will go and get the latest ... :-)
jeroensmeets
Member
Plugin Author
Posted 6 months ago #
You're welcome! The latest will do ;-)