|
@@ 359-365 (lines=7) @@
|
| 356 |
|
* In polylang the preferred language could be anything. |
| 357 |
|
* When we're adding a new object and language is set we only want the related objects if they are not translatable OR the same language |
| 358 |
|
*/ |
| 359 |
|
if ( $translator == 'PLL' |
| 360 |
|
&& ! empty( $_GET['new_lang'] ) |
| 361 |
|
&& ! empty( $_GET['post_type'] ) |
| 362 |
|
&& pll_is_translated_post_type( sanitize_text_field( $_GET['post_type'] ) ) |
| 363 |
|
) { |
| 364 |
|
$current_language = $_GET['new_lang']; |
| 365 |
|
} |
| 366 |
|
|
| 367 |
|
/** |
| 368 |
|
* Overwrite the current language if needed for taxonomies |
|
@@ 411-417 (lines=7) @@
|
| 408 |
|
* In polylang the preferred language could be anything. |
| 409 |
|
* When we're adding a new object and language is set we only want the related objects if they are not translatable OR the same language |
| 410 |
|
*/ |
| 411 |
|
if ( $translator == 'PLL' |
| 412 |
|
&& ! empty( $_GET['new_lang'] ) |
| 413 |
|
&& ! empty( $_GET['taxonomy'] ) |
| 414 |
|
&& pll_is_translated_taxonomy( sanitize_text_field( $_GET['taxonomy'] ) ) |
| 415 |
|
) { |
| 416 |
|
$current_language = $_GET['new_lang']; |
| 417 |
|
} |
| 418 |
|
} |
| 419 |
|
} |
| 420 |
|
} |