Code Duplication    Length = 13-15 lines in 2 locations

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

@@ 76-88 (lines=13) @@
73
		echo '</noscript>';
74
	}
75
76
	function jetpack_menu_order( $menu_order ) {
77
		$jp_menu_order = array();
78
79
		foreach ( $menu_order as $index => $item ) {
80
			if ( $item != 'jetpack' )
81
				$jp_menu_order[] = $item;
82
83
			if ( $index == 0 )
84
				$jp_menu_order[] = 'jetpack';
85
		}
86
87
		return $jp_menu_order;
88
	}
89
90
	function page_render() {
91
		/** This action is already documented in views/admin/admin-page.php */

class.jetpack.php 1 location

@@ 3832-3846 (lines=15) @@
3829
		return true;
3830
	}
3831
3832
	function jetpack_menu_order( $menu_order ) {
3833
		$jp_menu_order = array();
3834
3835
		foreach ( $menu_order as $index => $item ) {
3836
			if ( $item != 'jetpack' ) {
3837
				$jp_menu_order[] = $item;
3838
			}
3839
3840
			if ( $index == 0 ) {
3841
				$jp_menu_order[] = 'jetpack';
3842
			}
3843
		}
3844
3845
		return $jp_menu_order;
3846
	}
3847
3848
	function admin_banner_styles() {
3849
		$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';