I’ve been working on Top 10 v2.4.0 for a long time where the main focus of this release has been to get a more compatible tracker. Today, I’m happy to say that I have pushed through the release and you can now upgrade your favourite popular posts plugin as you normally would from within your WordPress Dashboard Updates screen. This version adds two new features, fixes several bugs, has cleaner code as per WordPress Coding Standards and also deprecates some functions.
Two months back I released v2.3.2 which fixed a security issue and also required me to remove the faster performance tracker. This was needed to ensure continued hosting with WordPress.org and respecting their guidelines. v2.4.0 is the first step towards building an addon that will bring back the faster tracker. This addon will be available for free from this website in the near future.
For now, you have two options for the tracker. Try both to see which delivers a better performance to your site. The first uses an external .js file that can be cached by browsers. The second is the old query style format. From my testing, both have similar performance. But, do toggle between both options to see which performs better. For the brave at heart, you can also adapt this gist which is the old source code for the faster tracker.
Update: It is recommended that you whitelist the tracker in W3 Total Cache, WP Super Cache, etc. You need to whitelist
Now you can “offset” your posts
Another very useful feature that I’ve added in v2.4.0 is the ability to offset the list of posts by a specific number. This is available via the shortcode or in the widget.
Using the offset you can now display posts starting from a different position e.g. display posts from 11 to 20 by setting it to offset to 10. It also helps if you would like to display multiple versions of the widget with different starting points.
As usual, if you’re looking for support, please create a new post in the Top 10 support forum. And, do blog, tweet and tell the whole world about this release.
Detailed list of changes in Top 10 v2.4.0
- New tracker using a properly enqueued
.jsfile. Two inbuilt options to use query variables or ajaxurl to process the counts
- Shortcode and the widget now have an added parameter for ‘offset’. This is useful if you would like to display different widgets/shortcodes but not always start from the first post
- New tracker using a properly enqueued
- Bug fixes:
- Attachments now work with the widget and elsewhere
- New tracker now works when jQuery is loaded in the footer
- Don’t add tracker code when previewing in customizer
- Doesn’t report an error if no author is assigned to a post
tptn_add_viewed_counthave been deprecated. These should no longer be needed with the new tracker option.
- wick script in Settings page which was used for fetching category slugs. You should now use the category name (prompted automatically). Slugs will be automatically converted into names.
Top 10 v2.4.0 broke my blogs. I updated three different sites and encountered the same problem each time. WordPress now deactivates this plugin for causing a fatal error.
Hi there was a problem with installs before PHP5.6 which caused this issue. I’ve released a new version that should fix this.
Please see this post in the support forums for a temporary fix.
Thanks for the quick reply.
I got a new fatal error.
Parse error: syntax error, unexpected T_FUNCTION in […] /wp-content/plugins/top-10/admin/class-stats.php on line 556
Loved this plugin before. Hope to keep using it.
Can you tell me your install. Which version of php and mysql are you running?
php 5.2.17 & mysql 5.2
These are both extremely old versions of php and mysql and it is strongly recommended that you upgrade from this.
I’m not in a position to test on this. But, let me see what I can do to fix the error.
Could you please delete those lines 556-558.
It won’t affecting the functioning except for setting the number of items on the View Popular posts pages.
I upgraded php last night like you suggested and now the plugin’s working again.
Thanks for confirming.
hi , is it possible change format number, for example 2.2k to 2200 total view.