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

@@ 3525-3539 (lines=15) @@
3522
		return true;
3523
	}
3524
3525
	function jetpack_menu_order( $menu_order ) {
3526
		$jp_menu_order = array();
3527
3528
		foreach ( $menu_order as $index => $item ) {
3529
			if ( $item != 'jetpack' ) {
3530
				$jp_menu_order[] = $item;
3531
			}
3532
3533
			if ( $index == 0 ) {
3534
				$jp_menu_order[] = 'jetpack';
3535
			}
3536
		}
3537
3538
		return $jp_menu_order;
3539
	}
3540
3541
	function admin_head() {
3542
		if ( isset( $_GET['configure'] ) && Jetpack::is_module( $_GET['configure'] ) && current_user_can( 'manage_options' ) )