Code Duplication    Length = 6-6 lines in 2 locations

modules/custom-post-types/nova.php 2 locations

@@ 403-408 (lines=6) @@
400
		$term_order = get_option( 'nova_menu_order', array() );
401
402
		$return = array();
403
		foreach ( $term_order as $term_id ) {
404
			if ( isset( $grouped_by_term["$term_id"] ) ) {
405
				$return = array_merge( $return, $grouped_by_term["$term_id"] );
406
				unset( $grouped_by_term["$term_id"] );
407
			}
408
		}
409
410
		foreach ( $grouped_by_term as $term_id => $posts ) {
411
			$return = array_merge( $return, $posts );
@@ 1013-1018 (lines=6) @@
1010
		$term_order = get_option( 'nova_menu_order', array() );
1011
1012
		$return = array();
1013
		foreach ( $term_order as $term_id ) {
1014
			if ( isset( $terms_by_id["$term_id"] ) ) {
1015
				$return[] = $terms_by_id["$term_id"];
1016
				unset( $terms_by_id["$term_id"] );
1017
			}
1018
		}
1019
1020
		foreach ( $terms_by_id as $term_id => $term ) {
1021
			$return[] = $term;