Code Duplication    Length = 13-15 lines in 2 locations

_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

class.jetpack.php 1 location

@@ 4016-4030 (lines=15) @@
4013
		return true;
4014
	}
4015
4016
	function jetpack_menu_order( $menu_order ) {
4017
		$jp_menu_order = array();
4018
4019
		foreach ( $menu_order as $index => $item ) {
4020
			if ( $item != 'jetpack' ) {
4021
				$jp_menu_order[] = $item;
4022
			}
4023
4024
			if ( $index == 0 ) {
4025
				$jp_menu_order[] = 'jetpack';
4026
			}
4027
		}
4028
4029
		return $jp_menu_order;
4030
	}
4031
4032
	function admin_head() {
4033
		if ( isset( $_GET['configure'] ) && Jetpack::is_module( $_GET['configure'] ) && current_user_can( 'manage_options' ) )