You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix(MslsBlog): add is_home() for posts pages
When a static page is set as WordPress "Posts page",
is_home() returns true but is_front_page() returns
false. The language switcher now detects this case
and falls back to the target blog's page_for_posts
when pages are not explicitly linked via MSLS.
Closes#97
* fix(MslsOptions): prevent blog slug corruption
The greedy str_replace in check_for_blog_slug()
matched /blog as substring of /blogg/, producing
truncated URLs like /sv/g/ instead of /sv/blogg/.
Replace with boundary-aware prefix stripping that
only removes the slug when followed by / or EOL.
* refactor(MslsBlog): rename $is_home to $is_front_page
Rename misleading variable and apply permalink hook
to the posts-page fallback for consistent filtering.
* fix(MslsOptions): only re-add slug when stripped
The is_main_site re-addition of the blog slug was
unconditional, corrupting URLs where the slug was
not stripped (e.g. /blogg/ becoming /blog/blogg/).
* test(MslsBlog): drop explicit apply_filters mock
Brain\Monkey handles apply_filters by default. The
explicit mock was inconsistent with other tests and
unnecessarily fragile.
---------
Co-authored-by: Dennis Ploetner <re@lloc.de>
0 commit comments