Code Duplication    Length = 4-5 lines in 3 locations

wp-admin/edit-comments.php 2 locations

@@ 235-239 (lines=5) @@
232
			$messages[] = sprintf( _n( '%s comment approved', '%s comments approved', $approved ), $approved );
233
		}
234
235
		if ( $spammed > 0 ) {
236
			$ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : 0;
237
			/* translators: %s: number of comments marked as spam */
238
			$messages[] = sprintf( _n( '%s comment marked as spam.', '%s comments marked as spam.', $spammed ), $spammed ) . ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=unspam&ids=$ids", "bulk-comments" ) ) . '">' . __('Undo') . '</a><br />';
239
		}
240
241
		if ( $unspammed > 0 ) {
242
			/* translators: %s: number of comments restored from the spam */
@@ 246-250 (lines=5) @@
243
			$messages[] = sprintf( _n( '%s comment restored from the spam', '%s comments restored from the spam', $unspammed ), $unspammed );
244
		}
245
246
		if ( $trashed > 0 ) {
247
			$ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : 0;
248
			/* translators: %s: number of comments moved to the Trash */
249
			$messages[] = sprintf( _n( '%s comment moved to the Trash.', '%s comments moved to the Trash.', $trashed ), $trashed ) . ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=untrash&ids=$ids", "bulk-comments" ) ) . '">' . __('Undo') . '</a><br />';
250
		}
251
252
		if ( $untrashed > 0 ) {
253
			/* translators: %s: number of comments restored from the Trash */

wp-admin/edit.php 1 location

@@ 322-325 (lines=4) @@
319
	elseif ( isset( $bulk_messages['post'][ $message ] ) )
320
		$messages[] = sprintf( $bulk_messages['post'][ $message ], number_format_i18n( $count ) );
321
322
	if ( $message == 'trashed' && isset( $_REQUEST['ids'] ) ) {
323
		$ids = preg_replace( '/[^0-9,]/', '', $_REQUEST['ids'] );
324
		$messages[] = '<a href="' . esc_url( wp_nonce_url( "edit.php?post_type=$post_type&doaction=undo&action=untrash&ids=$ids", "bulk-posts" ) ) . '">' . __('Undo') . '</a>';
325
	}
326
}
327
328
if ( $messages )