cabrerahector / wordpress-popular-posts

WordPress Popular Posts - A highly customizable WordPress widget that displays your most popular posts.
https://wordpress.org/plugins/wordpress-popular-posts/
GNU General Public License v2.0
280 stars 83 forks source link

Is there a way to count views without rest_url? #212

Closed portablesoft closed 5 years ago

portablesoft commented 5 years ago

I have disabled the JSON REST API using the following filters:

add_filter('json_enabled', 'return_false'); add_filter('json_jsonp_enabled', 'return_false');

However, the latest WordPress Popular Posts will use the rest_url to do post views count:

'ajax_url' => esc_url_raw( rest_url( 'wordpress-popular-posts/v1/popular-posts/' ) )

cabrerahector commented 5 years ago

Hi @portablesoft,

No, unfortunately that's not possible. WPP relies on the REST API to do various things, including -as you already noticed- keeping track of your site's views count.

Since WordPress itself will also be moving towards using the REST API everywhere (mainly because of Gutenberg) chances are WPP won't stop using it unless a suitable (and more efficient) alternative is introduced, something I honestly don't expect to see anytime soon.