Code Duplication    Length = 11-11 lines in 2 locations

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

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