|
@@ 8218-8224 (lines=7) @@
|
| 8215 |
|
* In polylang the preffered language could be anything. |
| 8216 |
|
* When we're adding a new object and the new language is set we only want the related objects if they are not translateable OR the same language as the current object |
| 8217 |
|
*/ |
| 8218 |
|
if ( $translator == 'PLL' |
| 8219 |
|
&& ! empty( $_GET['new_lang'] ) |
| 8220 |
|
&& ! empty( $_GET['post_type'] ) |
| 8221 |
|
&& pll_is_translated_post_type( sanitize_text_field( $_GET['post_type'] ) ) |
| 8222 |
|
) { |
| 8223 |
|
$current_language = $_GET['new_lang']; |
| 8224 |
|
} |
| 8225 |
|
|
| 8226 |
|
/** |
| 8227 |
|
* Overwrite the current_language var if needed for taxonomies |
|
@@ 8265-8271 (lines=7) @@
|
| 8262 |
|
* In polylang the preffered language could be anything. |
| 8263 |
|
* When we're adding a new object and the new language is set we only want the related objects if they are not translateable OR the same language as the current object |
| 8264 |
|
*/ |
| 8265 |
|
if ( $translator == 'PLL' |
| 8266 |
|
&& ! empty( $_GET['new_lang'] ) |
| 8267 |
|
&& ! empty( $_GET['taxonomy'] ) |
| 8268 |
|
&& pll_is_translated_taxonomy( sanitize_text_field( $_GET['taxonomy'] ) ) |
| 8269 |
|
) { |
| 8270 |
|
$current_language = $_GET['new_lang']; |
| 8271 |
|
} |
| 8272 |
|
} |
| 8273 |
|
} |
| 8274 |
|
} |