Code Duplication    Length = 6-7 lines in 2 locations

src/wp-admin/post-new.php 1 location

@@ 19-25 (lines=7) @@
16
 */
17
global $post_type, $post_type_object, $post;
18
19
if ( ! isset( $_GET['post_type'] ) ) {
20
	$post_type = 'post';
21
} elseif ( in_array( $_GET['post_type'], get_post_types( array('show_ui' => true ) ) ) ) {
22
	$post_type = $_GET['post_type'];
23
} else {
24
	wp_die( __( 'Invalid post type.' ) );
25
}
26
$post_type_object = get_post_type_object( $post_type );
27
28
if ( 'post' == $post_type ) {

src/wp-admin/plugins.php 1 location

@@ 448-453 (lines=6) @@
445
446
<?php if ( isset($_GET['error']) ) :
447
448
	if ( isset( $_GET['main'] ) )
449
		$errmsg = __( 'You cannot delete a plugin while it is active on the main site.' );
450
	elseif ( isset($_GET['charsout']) )
451
		$errmsg = sprintf(__('The plugin generated %d characters of <strong>unexpected output</strong> during activation. If you notice &#8220;headers already sent&#8221; messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.'), $_GET['charsout']);
452
	else
453
		$errmsg = __('Plugin could not be activated because it triggered a <strong>fatal error</strong>.');
454
	?>
455
	<div id="message" class="error"><p><?php echo $errmsg; ?></p>
456
	<?php