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

When "Ajaxify widget" is enabled, WPP doesn't switch languages #202

Closed cabrerahector closed 5 years ago

cabrerahector commented 5 years ago

With Polylang, and surely WPML as well, when the "Ajaxify Widget" feature is enabled the WPP widget outputs posts in the default language (eg. English).

We need to pass the current language to the REST Controller (or retrieve it there?) so it returns popular posts in the currently active language.

cabrerahector commented 5 years ago

See: https://wordpress.org/support/topic/how-to-know-the-language-of-a-post-through-the-wordpress-rest-api/