Code Duplication    Length = 13-15 lines in 2 locations

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

@@ 98-110 (lines=13) @@
95
		echo '</noscript>';
96
	}
97
98
	function jetpack_menu_order( $menu_order ) {
99
		$jp_menu_order = array();
100
101
		foreach ( $menu_order as $index => $item ) {
102
			if ( $item != 'jetpack' )
103
				$jp_menu_order[] = $item;
104
105
			if ( $index == 0 )
106
				$jp_menu_order[] = 'jetpack';
107
		}
108
109
		return $jp_menu_order;
110
	}
111
112
	function page_render() {
113
		/** This action is already documented in views/admin/admin-page.php */

class.jetpack.php 1 location

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