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

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