Code Duplication    Length = 13-15 lines in 2 locations

class.jetpack.php 1 location

@@ 3488-3502 (lines=15) @@
3485
		return true;
3486
	}
3487
3488
	function jetpack_menu_order( $menu_order ) {
3489
		$jp_menu_order = array();
3490
3491
		foreach ( $menu_order as $index => $item ) {
3492
			if ( $item != 'jetpack' ) {
3493
				$jp_menu_order[] = $item;
3494
			}
3495
3496
			if ( $index == 0 ) {
3497
				$jp_menu_order[] = 'jetpack';
3498
			}
3499
		}
3500
3501
		return $jp_menu_order;
3502
	}
3503
3504
	function admin_head() {
3505
		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

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