Code Duplication    Length = 13-15 lines in 2 locations

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

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

class.jetpack.php 1 location

@@ 4068-4082 (lines=15) @@
4065
		return true;
4066
	}
4067
4068
	function jetpack_menu_order( $menu_order ) {
4069
		$jp_menu_order = array();
4070
4071
		foreach ( $menu_order as $index => $item ) {
4072
			if ( $item != 'jetpack' ) {
4073
				$jp_menu_order[] = $item;
4074
			}
4075
4076
			if ( $index == 0 ) {
4077
				$jp_menu_order[] = 'jetpack';
4078
			}
4079
		}
4080
4081
		return $jp_menu_order;
4082
	}
4083
4084
	function admin_banner_styles() {
4085
		$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';