Code Duplication    Length = 13-15 lines in 2 locations

class.jetpack.php 1 location

@@ 3897-3911 (lines=15) @@
3894
		return true;
3895
	}
3896
3897
	function jetpack_menu_order( $menu_order ) {
3898
		$jp_menu_order = array();
3899
3900
		foreach ( $menu_order as $index => $item ) {
3901
			if ( $item != 'jetpack' ) {
3902
				$jp_menu_order[] = $item;
3903
			}
3904
3905
			if ( $index == 0 ) {
3906
				$jp_menu_order[] = 'jetpack';
3907
			}
3908
		}
3909
3910
		return $jp_menu_order;
3911
	}
3912
3913
	function admin_head() {
3914
		if ( isset( $_GET['configure'] ) && Jetpack::is_module( $_GET['configure'] ) && current_user_can( 'manage_options' ) )

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

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