Polylang 2.8

The most important part of our job is to provide support to our customers. This quite often requires that we obtain some technical informations about the WordPress and Polylang configurations. You certainly remember that WordPress recently introduced the Site Health page, available via Tools > Site Health, to display debugging information and test results which helps the support teams to achieve this goal. Polylang now uses this tool to run its own check (testing that the homepage is correctly translated in all languages) and to display various information about the plugin options and languages.

Some customers told us that it wasn’t easy to read the language from a post when the posts list table displays all posts in all languages. We heard these remarks and the previous “check-sign” icon has been replaced by the flag corresponding to the post’s language. Hopefully, this will make the language of a post easier to discover. Note that if you decided not to assign any flag to your languages, the language code is displayed instead.

The upcoming version 5.5 will include sitemaps directly in the WordPress core. This requires some adaptation of our plugin and Polylang 2.8 should be ready for this feature.

Polylang Pro will come with a new block which will display a language switcher. It will work exactly as the language switcher widget does since the earliest Polylang versions, but the feature is now directly accessible from your block library, under the widgets category.

Finally I would like to highlight a quite significant change for developpers. Up to now, we used not to filter some WP_Query made for the backend or the REST requests. This was the case when the query included some specific query vars directly specifying posts or terms (for example: ‘post__in’, ‘page_id’, ‘tag’… Here is the complete list). We ended up to realize that this was a pretty wrong idea which caused several conflicts. Thus, starting from the version 2.8, all the WP_Query will be filtered by default. It’s of course always possible to disable any language filter by including an empty ‘lang’ in the WP_Query arguments. Also, nothing changes on frontend, as the query is still auto-translated to return only posts in the current language.

You can test the release candidate version of Polylang 2.8 as of today, together with WordPress 5.5 RC1 to test the sitemaps. Polylang Pro 2.8 RC1 can be downloaded from your account. The free version is available on wordpress.org. Please test it and report bugs on GitHub.

WordPress 5.5 is planned for August, 11th and will come with several new features impacting Polylang, including the sitemaps but not only. Polylang 2.8 is planned for the next week. We recommend to wait for Polylang 2.8 before updating to WordPress 5.5.

Picture illustrating the article by Free-Photos and licensed under the Pixabay license.