Code Duplication    Length = 14-14 lines in 2 locations

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.

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

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