Code Duplication    Length = 4-4 lines in 2 locations

classes/PodsAPI.php 2 locations

@@ 8177-8180 (lines=4) @@
8174
							// Existing post + enabled for translations
8175
							$current_language = pll_get_post_language( (int) $_GET['post'] );
8176
8177
						} elseif ( ! empty( $_GET['new_lang'] ) && ! empty( $_GET['post_type'] ) && pll_is_translated_post_type( sanitize_text_field( $_GET['post_type'] ) )  ) {
8178
							// New post + enabled for translations
8179
							$current_language = $_GET['new_lang'];
8180
						}
8181
8182
					} elseif ( ( $current_screen->base == 'term' || $current_screen->base == 'edit-tags' ) ) {
8183
						// taxonomies
@@ 8190-8193 (lines=4) @@
8187
							// Existing tax + enabled for translations
8188
							$current_language = pll_get_term_language( (int) $_GET['tag_ID'] );
8189
8190
						} elseif ( ! empty( $_GET['new_lang'] ) && ! empty( $_GET['taxonomy'] ) && pll_is_translated_taxonomy( sanitize_text_field( $_GET['taxonomy'] ) ) ) {
8191
							// New tax + enabled for translations
8192
							$current_language = $_GET['new_lang'];
8193
						}
8194
8195
					}
8196
				}