Code Duplication    Length = 3-3 lines in 2 locations

json-endpoints/class.wpcom-json-api-update-post-v1-2-endpoint.php 1 location

@@ 392-394 (lines=3) @@
389
		/* add terms by ID */
390
		foreach ( $input['terms_by_id'] as $taxonomy => $terms ) {
391
			// combine with any previous selections
392
			if ( ! isset( $tax_input[ $taxonomy ] ) || ! is_array( $tax_input[ $taxonomy ] ) ) {
393
				$tax_input[ $taxonomy ] = array();
394
			}
395
396
			$is_hierarchical = is_taxonomy_hierarchical( $taxonomy );
397

modules/search/class.jetpack-search.php 1 location

@@ 658-660 (lines=3) @@
655
656
			$taxonomy = $tax_query['taxonomy'];
657
658
			if ( ! isset( $args[ $taxonomy ] ) || ! is_array( $args[ $taxonomy ] ) ) {
659
				$args[ $taxonomy ] = array();
660
			}
661
662
			$args[ $taxonomy ] = array_merge( $args[ $taxonomy ], $tax_query['terms'] );
663
		}