Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 385-387 (lines=3) @@
382
		/* add terms by ID */
383
		foreach ( $input['terms_by_id'] as $taxonomy => $terms ) {
384
			// combine with any previous selections
385
			if ( ! isset( $tax_input[ $taxonomy ] ) || ! is_array( $tax_input[ $taxonomy ] ) ) {
386
				$tax_input[ $taxonomy ] = array();
387
			}
388
389
			$is_hierarchical = is_taxonomy_hierarchical( $taxonomy );
390

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

@@ 389-391 (lines=3) @@
386
387
			$taxonomy = $tax_query['taxonomy'];
388
389
			if ( ! isset( $args[ $taxonomy ] ) || ! is_array( $args[ $taxonomy ] ) ) {
390
				$args[ $taxonomy ] = array();
391
			}
392
393
			$args[ $taxonomy ] = array_merge( $args[ $taxonomy ], $tax_query['terms'] );
394
		}