Repository navigation
What's Changed
Added
$wpml_block_override_skip_wp_editor(defaultfalse, needs$wpml_block_override). WPML lets an
editor translate a page in the WordPress editor instead of a WPML editor; each language then owns its
blocks.WpmlBlockOverrideignored that choice and still rendered the source's Copy values on such a
page, so a translation's own image never showed. With the flag on, the new
WpmlBlockOverride::skipWordPressEditorPages()vetoes the override on those pages through
timber_kit/wpml_block_override/should_override(last, atPHP_INT_MAX). It decides with WPML's own resolver
(WPML_TM_Post_Edit_TM_Editor_Mode::get_editor_settings(), present in WPML 4.9 and 5), once per page and request (#248).wp timber-kit wpml-block-override-audit. A read-only command that lists
the published pages$wpml_block_override_skip_wp_editorwould change:
pages translated in the WordPress editor where$wpml_block_override
changes at least one block today. Run it before turning the flag on for a
running site. Measured on two sites: one had 0 such pages, the other 21
pages with 129 blocks. Works on WPML 4.9 and 5 (#251).
Pull Requests
- #249 — feat(wpml): leave pages translated in the WordPress editor out of the block override
- #252 — feat(wpml): add a read-only audit of the pages the skip flag would change
Full Changelog: v1.68.0...v1.69.0