Code Duplication    Length = 11-11 lines in 2 locations

projects/plugins/jetpack/modules/masterbar/admin-menu/class-admin-menu.php 2 locations

@@ 143-153 (lines=11) @@
140
	 *
141
	 * @param bool $wp_admin Optional. Whether links should point to Calypso or wp-admin. Default false (Calypso).
142
	 */
143
	public function add_posts_menu( $wp_admin = false ) {
144
		if ( $wp_admin ) {
145
			return;
146
		}
147
148
		$submenus_to_update = array(
149
			'edit.php'     => 'https://wordpress.com/posts/' . $this->domain,
150
			'post-new.php' => 'https://wordpress.com/post/' . $this->domain,
151
		);
152
		$this->update_submenus( 'edit.php', $submenus_to_update );
153
	}
154
155
	/**
156
	 * Adds Media menu.
@@ 175-185 (lines=11) @@
172
	 *
173
	 * @param bool $wp_admin Optional. Whether links should point to Calypso or wp-admin. Default false (Calypso).
174
	 */
175
	public function add_page_menu( $wp_admin = false ) {
176
		if ( $wp_admin ) {
177
			return;
178
		}
179
180
		$submenus_to_update = array(
181
			'edit.php?post_type=page'     => 'https://wordpress.com/pages/' . $this->domain,
182
			'post-new.php?post_type=page' => 'https://wordpress.com/page/' . $this->domain,
183
		);
184
		$this->update_submenus( 'edit.php?post_type=page', $submenus_to_update );
185
	}
186
187
	/**
188
	 * Adds Testimonials menu.