Code Duplication    Length = 7-7 lines in 2 locations

classes/PodsAPI.php 2 locations

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