Code Duplication    Length = 13-15 lines in 2 locations

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

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

class.jetpack.php 1 location

@@ 3550-3564 (lines=15) @@
3547
		return true;
3548
	}
3549
3550
	function jetpack_menu_order( $menu_order ) {
3551
		$jp_menu_order = array();
3552
3553
		foreach ( $menu_order as $index => $item ) {
3554
			if ( $item != 'jetpack' ) {
3555
				$jp_menu_order[] = $item;
3556
			}
3557
3558
			if ( $index == 0 ) {
3559
				$jp_menu_order[] = 'jetpack';
3560
			}
3561
		}
3562
3563
		return $jp_menu_order;
3564
	}
3565
3566
	function admin_head() {
3567
		if ( isset( $_GET['configure'] ) && Jetpack::is_module( $_GET['configure'] ) && current_user_can( 'manage_options' ) )