[resolved] Sparkline files loading when toolbar disabled (5 posts)

  1. GermanKiwi
    Posted 2 years ago #

    Hi, I've noticed that my webpage source includes a reference in the footer to "wp-piwik-spark.css" and "jquery.sparkline.min.js" coming from this plugin.

    I've read the support thread here which explains that the sparkline files are used for the little Piwik graph in the Admin toolbar, and should only be loaded in the page source for a user who is logged in (as I currently am).

    However, I have disabled the toolbar from showing on my site, via the option in my Profile settings "Show Toolbar when viewing site". So when I view my homepage, there is no toolbar - the toolbar is only there when I'm viewing the Admin pages.

    Therefore, shouldn't that mean that the sparkline files should only be loaded for the Admin pages, and not for the front-end webpages - even when I'm logged in?

    Oh and incidentally (to change the subject a bit), when I was searching for what sparkline actually was, I discovered that there is a newer version available here which adds support for jQuery 1.10.0 - your plugin is still using the previous version of sparkline - maybe this newer version would be better, now that WordPress itself is using jQuery 1.10.x? (Although I'm no expert on jQuery so I don't really know what relevance this has!)



  2. braekling
    Plugin Author

    Posted 2 years ago #

    The scripts are loaded if the user is logged in and the sparkline graph is activated.

    I'm not sure if there is an alternative filter which allows to check if the toolbar is hidden. Whether such a filter is available, I will change this in a future version.

  3. GermanKiwi
    Posted 2 years ago #

    Thanks! Would the correct filter to use for this, be "is_admin_bar_showing"?

    From here:

  4. braekling
    Plugin Author

    Posted 2 years ago #

    Resolved in 0.9.9, release soon.

  5. GermanKiwi
    Posted 2 years ago #

    Great, thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.