Code Duplication    Length = 13-15 lines in 2 locations

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

@@ 86-98 (lines=13) @@
83
		echo '</noscript>';
84
	}
85
86
	function jetpack_menu_order( $menu_order ) {
87
		$jp_menu_order = array();
88
89
		foreach ( $menu_order as $index => $item ) {
90
			if ( $item != 'jetpack' )
91
				$jp_menu_order[] = $item;
92
93
			if ( $index == 0 )
94
				$jp_menu_order[] = 'jetpack';
95
		}
96
97
		return $jp_menu_order;
98
	}
99
100
	function page_render() {
101
		/** This action is already documented in views/admin/admin-page.php */

class.jetpack.php 1 location

@@ 3888-3902 (lines=15) @@
3885
		return true;
3886
	}
3887
3888
	function jetpack_menu_order( $menu_order ) {
3889
		$jp_menu_order = array();
3890
3891
		foreach ( $menu_order as $index => $item ) {
3892
			if ( $item != 'jetpack' ) {
3893
				$jp_menu_order[] = $item;
3894
			}
3895
3896
			if ( $index == 0 ) {
3897
				$jp_menu_order[] = 'jetpack';
3898
			}
3899
		}
3900
3901
		return $jp_menu_order;
3902
	}
3903
3904
	function admin_banner_styles() {
3905
		$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';