Code Duplication    Length = 7-7 lines in 2 locations

classes/PodsI18n.php 2 locations

@@ 337-343 (lines=7) @@
334
					 * In polylang the preferred language could be anything.
335
					 * 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
336
					 */
337
					if (   $translator == 'PLL'
338
					       && ! empty( $_GET['new_lang'] )
339
					       && ! empty( $_GET['post_type'] )
340
					       && pll_is_translated_post_type( sanitize_text_field( $_GET['post_type'] ) )
341
					) {
342
						$current_language = $_GET['new_lang'];
343
					}
344
345
					/**
346
					 * Overwrite the current language if needed for taxonomies
@@ 389-395 (lines=7) @@
386
					 * In polylang the preferred language could be anything.
387
					 * 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
388
					 */
389
					if (   $translator == 'PLL'
390
					       && ! empty( $_GET['new_lang'] )
391
					       && ! empty( $_GET['taxonomy'] )
392
					       && pll_is_translated_taxonomy( sanitize_text_field( $_GET['taxonomy'] ) )
393
					) {
394
						$current_language = $_GET['new_lang'];
395
					}
396
				}
397
			}
398
		}