Top 10 v2.6.0

I’ve uploaded Top 10 v2.6.0 into the WordPress repository and you can now download or update the plugin from within your WordPress dashboard. The new version of Top 10 – Popular Posts for WordPress brings several new features and a few modifications/fixes.

As usual, if you’re looking for support, create a new post in the support forums.

Modifications to the tracker

Many of the changes in this version have been to the tracker. Two small changes which should have a performance impact for some users is that the tracker JavaScript explicitly loads in the footer and the file is now renamed to top-10-tracker.min.js to indicate that it is already minimised.

Tracker settings in Top 10 v2.6.0
Tracker settings in Top 10 v2.6.0

In the screenshot above you’ll see three new options available in the tracker.

Debug mode

You can now set a debug mode option for the tracker. When enabled, it will set out a few messages which can be observed using the Network tab in Developer Tools of Chrome or Firefox. This should also be turned on in case you’re requesting support.

A typical success message is below which indicates that the counts were successfully updated. The first is for the overall count and the second is for the daily tables.

tt2 ttd1

In case of an error, you will find a message similar to:

tte ttde

Add tracker to all pages

Currently, the tracker js file is only added to singular pages. You can now enable this to be added to all pages by default. The should help if you have js concatenation plugins like Autoptimise by limiting the number of files that need to be created and served.

I’ve got plans for a REST API based tracker – but that is a few versions away. Until now, if you’re looking at a better performing tracker, take a look at Top 10 Fast Tracker which is a very early but functioning beta.

Thumbnail changes

You have a new option to disable the creation of thumbnails. This is particularly helpful if you have all kind of image sizes disabled and this plugin would enable these because the custom size was selected by elimination. This is a similar change I implemented in Contextual Related Posts last month.

The thumbnail HTML markup includes srcset and sizes attributes when available which was added in WordPress 4.4.

Besides the above changes, I’ve also made a lot of other changes including cleaning up the code for the latest WordPress standards, refactoring several portions of code. If you browse the current code base, you’ll also find several more functions and filters as a result of the refactoring.

What’s really needed and is on the agenda for this year is better documentation. Just need to find the time for this!

Changes in Top 10 v2.6.0 and v2.6.1

  • Features:
    • New option to disable creation of image thumbnails. Find this under Thumbnail options
    • Thumbnail HTML markup includes srcset and sizes attributes when available
    • New option to turn on debug mode. You can turn this on when requesting support. Find it under the Counter/Tracker tab
    • New option to add the tracker js file on all pages, not just singular pages. Helps with minification/concatenation
    • New date filter in the Popular posts listing page to see the views on a particular date
    • New option to turn ON/OFF the number formatting of the post counts. ON by default
  • Enhancements:
    • Load tracker in footer
    • Renamed top-10-tracker.js to top-10-tracker.min.js
  • Bug fixes:
    • Only delete option if null value is passed to tptn_update_option
    • “Exclude display on these post IDs” moved under Counter section

Top 10 v2.6.1 has been released to fix a bug with the widget that was introduced in v2.6.0

Download Top 10 v2.6.1