Code Duplication    Length = 13-15 lines in 2 locations

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

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

class.jetpack.php 1 location

@@ 4009-4023 (lines=15) @@
4006
		return true;
4007
	}
4008
4009
	function jetpack_menu_order( $menu_order ) {
4010
		$jp_menu_order = array();
4011
4012
		foreach ( $menu_order as $index => $item ) {
4013
			if ( $item != 'jetpack' ) {
4014
				$jp_menu_order[] = $item;
4015
			}
4016
4017
			if ( $index == 0 ) {
4018
				$jp_menu_order[] = 'jetpack';
4019
			}
4020
		}
4021
4022
		return $jp_menu_order;
4023
	}
4024
4025
	function admin_banner_styles() {
4026
		$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';