Releases: dougwollison/nlingual
Fix display of translation links in posts screen
v2.10.0.1 hotfix version number, changelog
WP/PHP compability updates, code standards compilance fixes.
This is almost a patch rather than a minor release, but the minimum requirement changes warrant it.
- Confirmed compatibility with WP 6.6 and PHP 7+, likely some deprecated warnings in PHP 8.
- Touched up a few edge cases such as undefined values or query mods being called on secondary queries.
- Localization fixes for a handful of strings.
- Thorough escaping on PHP output wherever possible.
- Attempted to fix as many WordPress coding standards errors as possible; most remaing errors/warnings are false positives.
- Much improved documentation on Registry and Translator methods, the overloaded methods like get_post_sync_rules and get_post_language are properly documented now.
Permission fixes, type checks, bug fixes.
v2.9.3 update version number, changelog
Quality of life improvements, Localizer/Synchronizer/Rewriter fixes, opt-out for accepted language.
The language column in the Posts screen will now list all languages rather than all translations, with create links for languages missing translations.
- Updated LocalizeThis to handle recent changes to TinyMCE API when used on editor fields
- Fixed issues with localizing term metadata
- Fixed issues with cloning/syncing posts with JSON data in content (now using wp_slash on post data)
- Fixed issues with URL rewriting; author pages and paginated links
- Add handling for syncing Post Formats if available (was not being listed as a sync-able taxonomy)
- Fix issues with navmenu/sidebar localizing outside of certain contexts
- Added missing permission checks for creating translations (previously did not check before creating a translation, which could potentially allow users to create draft translations they couldn't edit)
Additionally, you can now opt-out of the Accepted Language handling. Normally, nLingual will check the visitors browser language and redirect to the closest match if applicable; this can now be turned off so that the language must be specified in the URL, otherwise the default language of the site is used.
Hotfix: remove syntax error on php < 7.3
Accidentally included a trailing comma in an arguments list in the URL class, which is only accepted in php 7.3+
Hotfix: cleanup of language saving, allow specifying no accept codes for a language.
Forgot about the existing language saving not letting you specify an empty value for any field, despite intending to allow accept_code to be blank.
Fixed issue causing sitemap requests to redirect to posts page. Simplified accept-language handling.
Added logic to skip language setting/redirecting on sitemap requests, including built in WordPress sitemaps and versions provided by Yoast and AIO SEO plugins.
The Accept-Language handling has been simplified to only compare with the specified accept codes for a language, rather than also checking against the locale and ISO code. This allows more control over how Accept-Language is handled, including disabling it entirely for certain languages if desired.
Also ironed out a few bugs with URL rewriting.
Hotfix: long-overlooked typo localizing author posts pages.
Apparently there was a typo in the function call to get the author posts page URL, those types of URLs were overlooked in testing.
Improved redirection handling, URL rewriting, and blog switching support. Minor synchronizer fixes.
Improved handling of prefered languages
Visitor language preference is given more precedence now; if the visitor's browser specifies a language your site supports, they will be redirected to the site in that language regardless. Previously, this was ignored if "Skip Localization for Default Language?" was enabled, as there was no handling for a visitor in a non-default language to override the redirect and view the site in the default language. With this update, the Skip Localization option is ignored should the visitor's language match one of the others; allowing, for example, a french visitor to view the english side of youre site at /en/
regardless of if english visitors see it that way.
URL Localization fixes
There were some edge cases where a localized, paginated URL might have the /page/X/
bit duplicated, sometimes multiple times. The way localized URLs are constructed has been modified to prevent this.
Additionally, the localize_here
utility previously messed up URLs where the post type and/or taxonomies where specified in the query string (use case being filters on a specialized index page). The utility now checks for the post type first, then taxonomies, and only proceeds to use the canonical post_type/term link if only one is specified.
Finally, the system will no longer consider unpublished translations for published posts as available on the frontend; this prevents viewing an untranslated page in the other language from showing as not found.
Block Switching Support
Previously, using switch_to_blog()
on a multisite install would only have nLingual check if it's installed on the blog switched to, and remove it's hooks if not. This however did not prevent issues where the blog being switched to didn't support the same current language as the original. The System handler now tracks the current language for each blog switched to/from and tries to use one of the same slug, falling back to the default language for that blog. Not thorough but should mitigate most issues. Switching languages within a blog switch is not fully supported and may cause further issues.
Synchronizer tweaks
The clone_post
utility would not properly affix the language suffix when cloning a post, and also did not copy the post date properly when syncing posts.
Minor UI fixes
Fixed a few layout/functionality issues with the Translations meta box, particularly as it appears in the Block Editor.
Fix issue causing localized sidebars to forget their widgets.
The hook used to handle unlocalized nav menu locations and sidebars (copying default-language version's data to the unlocalized one) was accidentally hard coded to only work for nav menu locations, not sidebars. This caused the localized sidebars to be mistaken as unregistered, and so removed by the cleanup.