Skip to content

Translate Yoast replacement variables before template processing#1494

Open
Komarovski wants to merge 2 commits into
qtranslate:masterfrom
Komarovski:patch-8
Open

Translate Yoast replacement variables before template processing#1494
Komarovski wants to merge 2 commits into
qtranslate:masterfrom
Komarovski:patch-8

Conversation

@Komarovski

Copy link
Copy Markdown
Contributor

Translate Yoast SEO replacement variable values before inserting them into multilingual metadata templates.

When a multilingual variable such as %%title%% was inserted inside a Raw ML template, it produced nested qTranslate language blocks that could not be parsed correctly.

Process string replacement values through the current-language fallback before Yoast expands its templates.

This prevents duplicated or incorrectly ordered text in SEO titles, descriptions, Open Graph metadata, and X/Twitter metadata while preserving multilingual templates.

Translate Yoast SEO replacement variable values before inserting them
into multilingual metadata templates.

When a multilingual variable such as %%title%% was inserted inside a
Raw ML template, it produced nested qTranslate language blocks that
could not be parsed correctly.

Process string replacement values through the current-language fallback
before Yoast expands its templates.

This prevents duplicated or incorrectly ordered text in SEO titles,
descriptions, Open Graph metadata, and X/Twitter metadata while
preserving multilingual templates.
Comment thread src/modules/wp-seo/wp-seo-front.php Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// TODO: Remove this filter. wpseo_indexing_data only modifies data
// passed to Yoast's indexing UI and does not prevent indexables from
// being created or saved. Returning false may also break the expected
// array structure.

@Komarovski Komarovski marked this pull request as draft June 15, 2026 20:28
Removed the wpseo_indexing_data filter to prevent saving indexing data.
@Komarovski Komarovski marked this pull request as ready for review June 15, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant