Code Duplication    Length = 13-15 lines in 2 locations

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

@@ 130-142 (lines=13) @@
127
		return $module_name;
128
	}
129
130
	function jetpack_menu_order( $menu_order ) {
131
		$jp_menu_order = array();
132
133
		foreach ( $menu_order as $index => $item ) {
134
			if ( $item != 'jetpack' )
135
				$jp_menu_order[] = $item;
136
137
			if ( $index == 0 )
138
				$jp_menu_order[] = 'jetpack';
139
		}
140
141
		return $jp_menu_order;
142
	}
143
144
	function js_templates() {
145
		Jetpack::init()->load_view( 'admin/landing-page-templates.php' );

class.jetpack.php 1 location

@@ 3639-3653 (lines=15) @@
3636
		return true;
3637
	}
3638
3639
	function jetpack_menu_order( $menu_order ) {
3640
		$jp_menu_order = array();
3641
3642
		foreach ( $menu_order as $index => $item ) {
3643
			if ( $item != 'jetpack' ) {
3644
				$jp_menu_order[] = $item;
3645
			}
3646
3647
			if ( $index == 0 ) {
3648
				$jp_menu_order[] = 'jetpack';
3649
			}
3650
		}
3651
3652
		return $jp_menu_order;
3653
	}
3654
3655
	function admin_head() {
3656
		if ( isset( $_GET['configure'] ) && Jetpack::is_module( $_GET['configure'] ) && current_user_can( 'manage_options' ) )