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

@@ 4104-4118 (lines=15) @@
4101
		return true;
4102
	}
4103
4104
	function jetpack_menu_order( $menu_order ) {
4105
		$jp_menu_order = array();
4106
4107
		foreach ( $menu_order as $index => $item ) {
4108
			if ( $item != 'jetpack' ) {
4109
				$jp_menu_order[] = $item;
4110
			}
4111
4112
			if ( $index == 0 ) {
4113
				$jp_menu_order[] = 'jetpack';
4114
			}
4115
		}
4116
4117
		return $jp_menu_order;
4118
	}
4119
4120
	function admin_banner_styles() {
4121
		$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';