Code Duplication    Length = 13-15 lines in 2 locations

class.jetpack.php 1 location

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