PluginProbe
Polylang / 2.6.3
Polylang v2.6.3
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | modules/sync/sync-tax.php +1 -9 2.82.6.3 View file →
@@ -1,8 +1,5 @@
1 1 <?php
2 -/**
3 - * @package Polylang
4 - */
5 2
6 3 /**
7 4 * A class to manage the sychronization of taxonomy terms across posts translations
8 5 *
@@ -165,14 +162,9 @@
165 162 $this->copy_object_terms( $object_id, $tr_id, $lang, $terms, $taxonomy, $append );
166 163 } else {
167 164 // No permission to synchronize, so let's synchronize in reverse order
168 165 $orig_lang = array_search( $object_id, $tr_ids );
169 - $tr_terms = get_the_terms( $tr_id, $taxonomy );
170 -
171 - if ( false === $tr_terms ) {
172 - $tr_terms = array();
173 - }
174 -
166 + $tr_terms = (array) get_the_terms( $tr_id, $taxonomy );
175 167 if ( is_array( $tr_terms ) ) {
176 168 $tr_terms = wp_list_pluck( $tr_terms, 'term_id' );
177 169 $this->copy_object_terms( $tr_id, $object_id, $orig_lang, $tr_terms, $taxonomy, $append );
178 170 }