This pull request adds a new Yoast SEO tab to translation term metabox, it also fixes the issue about automatic synchronization of Yoast SEO values across connected sites.
We had to include a new action (multilingualpress.metabox_after_relate_terms) in MultingualPress 3, it will be included in the next release, in the meantime here is what we´ve just included:
In src/multilingualpress/TranslationUi/Term/MetaboxAction.php at the very top add this new line:
const ACTION_METABOX_AFTER_RELATE_TERMS = 'multilingualpress.metabox_after_relate_terms';
Then in doSaveOperation replace this:
$termTaxonomyId = $this->saveTerm($termData, $relationshipHelper);
for this:
This pull request adds a new Yoast SEO tab to translation term metabox, it also fixes the issue about automatic synchronization of Yoast SEO values across connected sites.
We had to include a new action (
multilingualpress.metabox_after_relate_terms
) in MultingualPress 3, it will be included in the next release, in the meantime here is what we´ve just included:In src/multilingualpress/TranslationUi/Term/MetaboxAction.php at the very top add this new line:
const ACTION_METABOX_AFTER_RELATE_TERMS = 'multilingualpress.metabox_after_relate_terms';
Then in
doSaveOperation
replace this:$termTaxonomyId = $this->saveTerm($termData, $relationshipHelper);
for this:Finally change
saveTerm
method signature from this:private function saveTerm(array $termData, TermRelationSaveHelper $helper): int
to this:and add the action just before last line in the method (
return (int)$remoteTerm->term_taxonomy_id;
):