Code Duplication    Length = 13-15 lines in 2 locations

_inc/lib/admin-pages/class.jetpack-react-page.php 1 location

@@ 92-104 (lines=13) @@
89
			. "</script>";
90
	}
91
92
	function jetpack_menu_order( $menu_order ) {
93
		$jp_menu_order = array();
94
95
		foreach ( $menu_order as $index => $item ) {
96
			if ( $item != 'jetpack' )
97
				$jp_menu_order[] = $item;
98
99
			if ( $index == 0 )
100
				$jp_menu_order[] = 'jetpack';
101
		}
102
103
		return $jp_menu_order;
104
	}
105
106
	// Render the configuration page for the module if it exists and an error
107
	// screen if the module is not configurable

class.jetpack.php 1 location

@@ 3655-3669 (lines=15) @@
3652
		return true;
3653
	}
3654
3655
	function jetpack_menu_order( $menu_order ) {
3656
		$jp_menu_order = array();
3657
3658
		foreach ( $menu_order as $index => $item ) {
3659
			if ( $item != 'jetpack' ) {
3660
				$jp_menu_order[] = $item;
3661
			}
3662
3663
			if ( $index == 0 ) {
3664
				$jp_menu_order[] = 'jetpack';
3665
			}
3666
		}
3667
3668
		return $jp_menu_order;
3669
	}
3670
3671
	function admin_head() {
3672
		if ( isset( $_GET['configure'] ) && Jetpack::is_module( $_GET['configure'] ) && current_user_can( 'manage_options' ) )