Code Duplication    Length = 6-6 lines in 2 locations

projects/plugins/jetpack/modules/custom-post-types/nova.php 2 locations

@@ 429-434 (lines=6) @@
426
		$term_order = get_option( 'nova_menu_order', array() );
427
428
		$return = array();
429
		foreach ( $term_order as $term_id ) {
430
			if ( isset( $grouped_by_term["$term_id"] ) ) {
431
				$return = array_merge( $return, $grouped_by_term["$term_id"] );
432
				unset( $grouped_by_term["$term_id"] );
433
			}
434
		}
435
436
		foreach ( $grouped_by_term as $term_id => $posts ) {
437
			$return = array_merge( $return, $posts );
@@ 1067-1072 (lines=6) @@
1064
		$term_order = get_option( 'nova_menu_order', array() );
1065
1066
		$return = array();
1067
		foreach ( $term_order as $term_id ) {
1068
			if ( isset( $terms_by_id["$term_id"] ) ) {
1069
				$return[] = $terms_by_id["$term_id"];
1070
				unset( $terms_by_id["$term_id"] );
1071
			}
1072
		}
1073
1074
		foreach ( $terms_by_id as $term_id => $term ) {
1075
			$return[] = $term;