Code Duplication    Length = 13-15 lines in 2 locations

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

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

class.jetpack.php 1 location

@@ 3948-3962 (lines=15) @@
3945
		return true;
3946
	}
3947
3948
	function jetpack_menu_order( $menu_order ) {
3949
		$jp_menu_order = array();
3950
3951
		foreach ( $menu_order as $index => $item ) {
3952
			if ( $item != 'jetpack' ) {
3953
				$jp_menu_order[] = $item;
3954
			}
3955
3956
			if ( $index == 0 ) {
3957
				$jp_menu_order[] = 'jetpack';
3958
			}
3959
		}
3960
3961
		return $jp_menu_order;
3962
	}
3963
3964
	function admin_banner_styles() {
3965
		$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';