Releases: dbrabyn/polylang-slug-toolkit
Release list
v2.0.3 — shared slugs on the default `post` type
Bug fix release. Shared slugs previously worked on custom post types but silently did nothing on the default post type.
The bug
PLL_Shared_Slugs::should_constrain_flat() read the queried post type as:
$pt = $qv["post_type"] ?? "post";WP_Query fills post_type with an empty string (not null) before posts_where fires, so ?? never fell back. The guard then tested pll_is_translated_post_type("") — false — and skipped the language constraint.
That affected exactly one post type: post, the only one whose rewrite rule omits post_type from the query. Custom post types carry an explicit post_type and were never affected.
Impact
With two translations sharing a post slug, both matched the by-name query, so:
- a single-post template looped over every translation, rendering each language copy one after another on the same page, and
- the default-language URL 301-redirected to whichever translation sorted first.
Fix
Fall back on emptiness rather than nullness. Arrays and "any" still bail out via the existing is_string / is_translated_type checks, so all conservative cases are unchanged.
No settings or data changes; update and the fix applies.
v2.0.2 — French translation
Adds French (fr_FR) translation of the plugin's admin UI. No routing changes.
v2.0.1 — full i18n + Spanish
Localization release.
- Fixes a gettext extraction defect: two settings strings were passed to translation functions via variables (not extractable). Now every user-facing string is a literal at the call site.
- Adds
languages/: the.pottemplate plus a complete Spanish (es_ES).po/.mo. - The routing engine remains locale-free — this localizes only the plugin's own admin UI.
No behavior change to slug/base routing. Self-flush still applies on update.
v2.0.0 — Polylang Slug Toolkit
Rebrand of Shared Slugs for Polylang into a module-based toolkit.
Modules
- Shared slugs (existing) — translations share one slug across languages.
- Translated bases (new) — config-driven per-language archive/base
translation, e.g./products/(default) and/es/productos/. Map via the
pll_slug_toolkit_base_mapfilter.
Notes
- Engine is fully generic; per-site base maps live in the theme/mu-plugin.
- Rewrite rules self-flush on any rule-set or version change — no manual
Permalinks re-save, including on production. - Guarded per-module loading: each module loads only when enabled.
Migration from v1.x (folder/slug rename)
Folder/slug change polylang-shared-slugs → polylang-slug-toolkit. The
shared-slugs option name and the old GitHub token constant/filter are preserved.
Do a one-time manual folder swap on existing installs (PUC can't rename folders);
do not use the in-dashboard "update" on the old plugin for this transition.
v1.0.0
Initial public release.
Shared slugs across Polylang languages for Polylang Free — per-language slug uniqueness on save, plus language-aware query resolution for flat and hierarchical post types. Opt-in (Settings → Reading) and self-disables unless Polylang sets the language from the URL (force_lang).
Independent, unofficial add-on. Not affiliated with or endorsed by Polylang / WP Syntex.