Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 58-71 (lines=14) @@
55
	/**
56
	 * Create the desired menu output.
57
	 */
58
	public function reregister_menu_items() {
59
		parent::reregister_menu_items();
60
61
		$this->add_my_home_menu();
62
63
		// Not needed outside of wp-admin.
64
		if ( ! $this->is_api_request ) {
65
			$this->add_browse_sites_link();
66
			$this->add_site_card_menu();
67
			$this->add_new_site_link();
68
		}
69
70
		ksort( $GLOBALS['menu'] );
71
	}
72
73
	/**
74
	 * Forces Posts menu to WPAdmin for Atomic sites only.

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

@@ 45-58 (lines=14) @@
42
	/**
43
	 * Create the desired menu output.
44
	 */
45
	public function reregister_menu_items() {
46
		parent::reregister_menu_items();
47
48
		$this->add_my_home_menu();
49
50
		// Not needed outside of wp-admin.
51
		if ( ! $this->is_api_request ) {
52
			$this->add_browse_sites_link();
53
			$this->add_site_card_menu();
54
			$this->add_new_site_link();
55
		}
56
57
		ksort( $GLOBALS['menu'] );
58
	}
59
60
	/**
61
	 * Adds the site switcher link if user has more than one site.