Code Duplication    Length = 22-22 lines in 4 locations

modules/custom-post-types/comics.php 1 location

@@ 299-320 (lines=22) @@
296
	/*
297
	 * Update messages for the Comic admin.
298
	 */
299
	function updated_messages( $messages ) {
300
		global $post;
301
302
		$messages['jetpack-comic'] = array(
303
			0  => '', // Unused. Messages start at index 1.
304
			1  => sprintf( __( 'Comic updated. <a href="%s">View comic</a>', 'jetpack'), esc_url( get_permalink( $post->ID ) ) ),
305
			2  => esc_html__( 'Custom field updated.', 'jetpack' ),
306
			3  => esc_html__( 'Custom field deleted.', 'jetpack' ),
307
			4  => esc_html__( 'Comic updated.', 'jetpack' ),
308
			/* translators: %s: date and time of the revision */
309
			5  => isset( $_GET['revision'] ) ? sprintf( esc_html__( 'Comic restored to revision from %s', 'jetpack'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
310
			6  => sprintf( __( 'Comic published. <a href="%s">View comic</a>', 'jetpack' ), esc_url( get_permalink( $post->ID ) ) ),
311
			7  => esc_html__( 'Comic saved.', 'jetpack' ),
312
			8  => sprintf( __( 'Comic submitted. <a target="_blank" href="%s">Preview comic</a>', 'jetpack'), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ),
313
			9  => sprintf( __( 'Comic scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview comic</a>', 'jetpack' ),
314
			// translators: Publish box date format, see http://php.net/date
315
			date_i18n( __( 'M j, Y @ G:i', 'jetpack' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post->ID) ) ),
316
			10 => sprintf( __( 'Comic draft updated. <a target="_blank" href="%s">Preview comic</a>', 'jetpack' ), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ),
317
		);
318
319
		return $messages;
320
	}
321
322
	/**
323
	 * Should this Custom Post Type be made available?

modules/custom-post-types/nova.php 1 location

@@ 264-285 (lines=22) @@
261
	/**
262
	 * Update messages for the Menu Item admin.
263
	 */
264
	function updated_messages( $messages ) {
265
		global $post;
266
267
		$messages[self::MENU_ITEM_POST_TYPE] = array(
268
			0  => '', // Unused. Messages start at index 1.
269
				/* translators: this is about a food menu */
270
			1  => sprintf( __( 'Menu item updated. <a href="%s">View item</a>', 'jetpack' ), esc_url( get_permalink( $post->ID ) ) ),
271
			2  => esc_html__( 'Custom field updated.', 'jetpack' ),
272
			3  => esc_html__( 'Custom field deleted.', 'jetpack' ),
273
			/* translators: this is about a food menu */
274
			4  => esc_html__( 'Menu item updated.', 'jetpack' ),
275
			/* translators: %s: date and time of the revision */
276
			5  => isset( $_GET['revision'] ) ? sprintf( esc_html__( 'Menu item restored to revision from %s', 'jetpack' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
277
			/* translators: this is about a food menu */
278
			6  => sprintf( __( 'Menu item published. <a href="%s">View item</a>', 'jetpack' ), esc_url( get_permalink( $post->ID ) ) ),
279
			/* translators: this is about a food menu */
280
			7  => esc_html__( 'Menu item saved.', 'jetpack' ),
281
			/* translators: this is about a food menu */
282
			8  => sprintf( __( 'Menu item submitted. <a target="_blank" href="%s">Preview item</a>', 'jetpack' ), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ),
283
			/* translators: this is about a food menu */
284
			9  => sprintf( __( 'Menu item scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview item</a>', 'jetpack' ),
285
			// translators: Publish box date format, see http://php.net/date
286
			date_i18n( __( 'M j, Y @ G:i', 'jetpack' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post->ID) ) ),
287
			/* translators: this is about a food menu */
288
			10 => sprintf( __( 'Menu item draft updated. <a target="_blank" href="%s">Preview item</a>', 'jetpack' ), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ),

modules/custom-post-types/testimonial.php 1 location

@@ 343-364 (lines=22) @@
340
	/**
341
	 * Update messages for the Testimonial admin.
342
	 */
343
	function updated_messages( $messages ) {
344
		global $post;
345
346
		$messages[ self::CUSTOM_POST_TYPE ] = array(
347
			0  => '', // Unused. Messages start at index 1.
348
			1  => sprintf( __( 'Testimonial updated. <a href="%s">View testimonial</a>', 'jetpack'), esc_url( get_permalink( $post->ID ) ) ),
349
			2  => esc_html__( 'Custom field updated.', 'jetpack' ),
350
			3  => esc_html__( 'Custom field deleted.', 'jetpack' ),
351
			4  => esc_html__( 'Testimonial updated.', 'jetpack' ),
352
			/* translators: %s: date and time of the revision */
353
			5  => isset( $_GET['revision'] ) ? sprintf( esc_html__( 'Testimonial restored to revision from %s', 'jetpack'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
354
			6  => sprintf( __( 'Testimonial published. <a href="%s">View testimonial</a>', 'jetpack' ), esc_url( get_permalink( $post->ID ) ) ),
355
			7  => esc_html__( 'Testimonial saved.', 'jetpack' ),
356
			8  => sprintf( __( 'Testimonial submitted. <a target="_blank" href="%s">Preview testimonial</a>', 'jetpack'), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ),
357
			9  => sprintf( __( 'Testimonial scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview testimonial</a>', 'jetpack' ),
358
				// translators: Publish box date format, see http://php.net/date
359
				date_i18n( __( 'M j, Y @ G:i', 'jetpack' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post->ID) ) ),
360
			10 => sprintf( __( 'Testimonial draft updated. <a target="_blank" href="%s">Preview testimonial</a>', 'jetpack' ), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ),
361
		);
362
363
		return $messages;
364
	}
365
366
	/**
367
	 * Change ‘Enter Title Here’ text for the Testimonial.

modules/custom-post-types/portfolios.php 1 location

@@ 334-355 (lines=22) @@
331
	/**
332
	 * Update messages for the Portfolio admin.
333
	 */
334
	function updated_messages( $messages ) {
335
		global $post;
336
337
		$messages[self::CUSTOM_POST_TYPE] = array(
338
			0  => '', // Unused. Messages start at index 1.
339
			1  => sprintf( __( 'Project updated. <a href="%s">View item</a>', 'jetpack'), esc_url( get_permalink( $post->ID ) ) ),
340
			2  => esc_html__( 'Custom field updated.', 'jetpack' ),
341
			3  => esc_html__( 'Custom field deleted.', 'jetpack' ),
342
			4  => esc_html__( 'Project updated.', 'jetpack' ),
343
			/* translators: %s: date and time of the revision */
344
			5  => isset( $_GET['revision'] ) ? sprintf( esc_html__( 'Project restored to revision from %s', 'jetpack'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
345
			6  => sprintf( __( 'Project published. <a href="%s">View project</a>', 'jetpack' ), esc_url( get_permalink( $post->ID ) ) ),
346
			7  => esc_html__( 'Project saved.', 'jetpack' ),
347
			8  => sprintf( __( 'Project submitted. <a target="_blank" href="%s">Preview project</a>', 'jetpack'), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ),
348
			9  => sprintf( __( 'Project scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview project</a>', 'jetpack' ),
349
			// translators: Publish box date format, see http://php.net/date
350
			date_i18n( __( 'M j, Y @ G:i', 'jetpack' ), strtotime( $post->post_date ) ), esc_url( get_permalink( $post->ID ) ) ),
351
			10 => sprintf( __( 'Project item draft updated. <a target="_blank" href="%s">Preview project</a>', 'jetpack' ), esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ),
352
		);
353
354
		return $messages;
355
	}
356
357
	/**
358
	 * Change ‘Title’ column label