INN / Google-Analytics-Popular-Posts

A WordPress plugin that uses Google Analytics data to determine the most popular posts on your site and display a list of popular posts via the included widget.
https://wordpress.org/plugins/ga-popular-posts/
23 stars 7 forks source link

Removes x2 multiplier on num_posts #65

Closed wadehammes closed 7 years ago

wadehammes commented 7 years ago

Fixes #64

aschweigert commented 7 years ago

seems odd that would have been in there all this time...do we know where that came from originally? @benlk?

benlk commented 7 years ago

Yeah, that 2x modifier is weird. My best guess is that maybe it was introduced with code borrowed from the Largo Related Posts Widget, where it would've been necessary because of how Largo_Related trimmed the number of posts down.

rclations commented 7 years ago

yeah, introduced in the second to last commit https://github.com/wadehammes/Google-Analytics-Popular-Posts/commit/26f718a69ff10c7393578e42c8e2e24ed669adf1#diff-b7ae0382593cd8bbd542e40639bf1182

benlk commented 7 years ago

I wonder what we have that's modifying that filter.

rclations commented 7 years ago

thanks for the patch, @wadehammes!

wadehammes commented 7 years ago

@rclations no problem guys!

benlk commented 7 years ago

As far as I can tell, we have used that filter for one thing: https://github.com/religionnews/theme-rns/blob/master/inc/widgets.php#L25-L46

Which does not require the * 2.