Code Duplication    Length = 17-18 lines in 2 locations

projects/plugins/jetpack/modules/masterbar/admin-menu/class-atomic-admin-menu.php 1 location

@@ 35-51 (lines=17) @@
32
	/**
33
	 * Create the desired menu output.
34
	 */
35
	public function reregister_menu_items() {
36
		parent::reregister_menu_items();
37
38
		$wp_admin = $this->should_link_to_wp_admin();
39
40
		$this->add_my_home_menu( $wp_admin );
41
		$this->add_theme_install_menu( $wp_admin );
42
43
		// Not needed outside of wp-admin.
44
		if ( ! $this->is_api_request ) {
45
			$this->add_browse_sites_link();
46
			$this->add_site_card_menu();
47
			$this->add_new_site_link();
48
		}
49
50
		ksort( $GLOBALS['menu'] );
51
	}
52
53
	/**
54
	 * Adds Plugins menu.

projects/plugins/jetpack/modules/masterbar/admin-menu/class-wpcom-admin-menu.php 1 location

@@ 36-53 (lines=18) @@
33
	/**
34
	 * Create the desired menu output.
35
	 */
36
	public function reregister_menu_items() {
37
		parent::reregister_menu_items();
38
39
		$wp_admin = $this->should_link_to_wp_admin();
40
41
		$this->add_my_home_menu( $wp_admin );
42
43
		// Not needed outside of wp-admin.
44
		if ( ! $this->is_api_request ) {
45
			$this->add_browse_sites_link();
46
			$this->add_site_card_menu();
47
			$this->add_new_site_link();
48
		}
49
50
		$this->add_gutenberg_menus( $wp_admin );
51
52
		ksort( $GLOBALS['menu'] );
53
	}
54
55
	/**
56
	 * Adds the site switcher link if user has more than one site.