Code Duplication    Length = 13-15 lines in 2 locations

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

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

class.jetpack.php 1 location

@@ 3927-3941 (lines=15) @@
3924
		return true;
3925
	}
3926
3927
	function jetpack_menu_order( $menu_order ) {
3928
		$jp_menu_order = array();
3929
3930
		foreach ( $menu_order as $index => $item ) {
3931
			if ( $item != 'jetpack' ) {
3932
				$jp_menu_order[] = $item;
3933
			}
3934
3935
			if ( $index == 0 ) {
3936
				$jp_menu_order[] = 'jetpack';
3937
			}
3938
		}
3939
3940
		return $jp_menu_order;
3941
	}
3942
3943
	function admin_banner_styles() {
3944
		$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';