|
@@ 8428-8434 (lines=7) @@
|
| 8425 |
|
* In polylang the preferred language could be anything. |
| 8426 |
|
* 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 |
| 8427 |
|
*/ |
| 8428 |
|
if ( $translator == 'PLL' |
| 8429 |
|
&& ! empty( $_GET['new_lang'] ) |
| 8430 |
|
&& ! empty( $_GET['post_type'] ) |
| 8431 |
|
&& pll_is_translated_post_type( sanitize_text_field( $_GET['post_type'] ) ) |
| 8432 |
|
) { |
| 8433 |
|
$current_language = $_GET['new_lang']; |
| 8434 |
|
} |
| 8435 |
|
|
| 8436 |
|
/** |
| 8437 |
|
* Overwrite the current language if needed for taxonomies |
|
@@ 8480-8486 (lines=7) @@
|
| 8477 |
|
* In polylang the preferred language could be anything. |
| 8478 |
|
* 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 |
| 8479 |
|
*/ |
| 8480 |
|
if ( $translator == 'PLL' |
| 8481 |
|
&& ! empty( $_GET['new_lang'] ) |
| 8482 |
|
&& ! empty( $_GET['taxonomy'] ) |
| 8483 |
|
&& pll_is_translated_taxonomy( sanitize_text_field( $_GET['taxonomy'] ) ) |
| 8484 |
|
) { |
| 8485 |
|
$current_language = $_GET['new_lang']; |
| 8486 |
|
} |
| 8487 |
|
} |
| 8488 |
|
} |
| 8489 |
|
} |