WebberZone / top-10

Top 10 - Popular Posts plugin for WordPress

Home Page:https://webberzone.com/plugins/top-10/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Top_Ten_Query stopped working in version 3.2

nunowar opened this issue · comments

With the 3.2 update, the Top_Ten_Query returns a Fatal error: Uncaught Error: Call to undefined function restore_current_blog() in /wp-content/plugins/top-10/includes/class-top-ten-query.php:651.

I'm using this Top_Ten_Query just to get trending posts and make a list with a custom HTML:

$trending_posts = new Top_Ten_Query(['daily' => true, 'limit' => 4]);

With 3.2 should I change something here?

Thanks.

Please could you try editing this line in the file: https://github.com/WebberZone/top-10/blob/master/includes/class-top-ten-query.php#L647

Change it to:
if ( $this->multiple_blogs ) {

@nunowar

Can you try this release which is a beta and let me know if you see this issue?
https://github.com/WebberZone/top-10/releases/tag/v3.2.1-beta1

@nunowar

Can you try this release which is a beta and let me know if you see this issue? https://github.com/WebberZone/top-10/releases/tag/v3.2.1-beta1

Yes, it works.

Thanks.

I had the same issue and with beta version it was fixed

Thanks both for confirming. I will push through a release later today.