Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 176-186 (lines=11) @@
173
	 *
174
	 * @param bool $wp_admin Optional. Whether links should point to Calypso or wp-admin. Default false (Calypso).
175
	 */
176
	public function add_posts_menu( $wp_admin = false ) {
177
		if ( $wp_admin ) {
178
			return;
179
		}
180
181
		$submenus_to_update = array(
182
			'edit.php'     => 'https://wordpress.com/posts/' . $this->domain,
183
			'post-new.php' => 'https://wordpress.com/post/' . $this->domain,
184
		);
185
		$this->update_submenus( 'edit.php', $submenus_to_update );
186
	}
187
188
	/**
189
	 * Adds Media menu.
@@ 208-218 (lines=11) @@
205
	 *
206
	 * @param bool $wp_admin Optional. Whether links should point to Calypso or wp-admin. Default false (Calypso).
207
	 */
208
	public function add_page_menu( $wp_admin = false ) {
209
		if ( $wp_admin ) {
210
			return;
211
		}
212
213
		$submenus_to_update = array(
214
			'edit.php?post_type=page'     => 'https://wordpress.com/pages/' . $this->domain,
215
			'post-new.php?post_type=page' => 'https://wordpress.com/page/' . $this->domain,
216
		);
217
		$this->update_submenus( 'edit.php?post_type=page', $submenus_to_update );
218
	}
219
220
	/**
221
	 * Adds Testimonials menu.