Code Duplication    Length = 18-18 lines in 2 locations

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

@@ 63-80 (lines=18) @@
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
			$nudge = $this->get_upsell_nudge();
73
			if ( $nudge ) {
74
				parent::add_upsell_nudge( $nudge );
75
			}
76
			$this->add_new_site_link();
77
		}
78
79
		ksort( $GLOBALS['menu'] );
80
	}
81
82
	/**
83
	 * Forces Posts menu to WPAdmin for Atomic sites only.

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

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