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

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