Code Duplication    Length = 14-14 lines in 2 locations

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

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

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

@@ 30-43 (lines=14) @@
27
	/**
28
	 * Create the desired menu output.
29
	 */
30
	public function reregister_menu_items() {
31
		parent::reregister_menu_items();
32
33
		// Not needed outside of wp-admin.
34
		if ( ! $this->is_api_request ) {
35
			$this->add_browse_sites_link();
36
			$this->add_site_card_menu();
37
			$this->add_new_site_link();
38
		}
39
40
		$this->add_jetpack_menu();
41
42
		ksort( $GLOBALS['menu'] );
43
	}
44
45
	/**
46
	 * Adds the site switcher link if user has more than one site.