Code Duplication    Length = 7-7 lines in 2 locations

classes/PodsAPI.php 2 locations

@@ 8219-8225 (lines=7) @@
8216
					 * In polylang the preferred language could be anything. 
8217
					 * 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
8218
					 */
8219
					if (   $translator == 'PLL' 
8220
						&& ! empty( $_GET['new_lang'] ) 
8221
						&& ! empty( $_GET['post_type'] ) 
8222
						&& pll_is_translated_post_type( sanitize_text_field( $_GET['post_type'] ) ) 
8223
					) {
8224
						$current_language = $_GET['new_lang'];
8225
					}
8226
8227
				/**
8228
				 * Overwrite the current language if needed for taxonomies
@@ 8266-8272 (lines=7) @@
8263
					 * In polylang the preferred language could be anything. 
8264
					 * 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
8265
					 */
8266
					if (   $translator == 'PLL' 
8267
						&& ! empty( $_GET['new_lang'] ) 
8268
						&& ! empty( $_GET['taxonomy'] ) 
8269
						&& pll_is_translated_taxonomy( sanitize_text_field( $_GET['taxonomy'] ) ) 
8270
					) {
8271
						$current_language = $_GET['new_lang'];
8272
					}
8273
				}
8274
			}
8275
		}