Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 36-49 (lines=14) @@
33
	/**
34
	 * Create the desired menu output.
35
	 */
36
	public function reregister_menu_items() {
37
		parent::reregister_menu_items();
38
39
		$this->add_my_home_menu();
40
41
		// Not needed outside of wp-admin.
42
		if ( ! $this->is_api_request ) {
43
			$this->add_browse_sites_link();
44
			$this->add_site_card_menu();
45
			$this->add_new_site_link();
46
		}
47
48
		ksort( $GLOBALS['menu'] );
49
	}
50
51
	/**
52
	 * 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

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