Code Duplication    Length = 7-7 lines in 2 locations

modules/custom-css/custom-css.php 2 locations

@@ 441-447 (lines=7) @@
438
			$post['post_content_filtered'] = wp_slash( $compressed_css );
439
440
			// Set excerpt to current theme, for display in revisions list
441
			if ( function_exists( 'wp_get_theme' ) ) {
442
				$current_theme = wp_get_theme();
443
				$post['post_excerpt'] = $current_theme->Name;
444
			}
445
			else {
446
				$post['post_excerpt'] = get_current_theme();
447
			}
448
449
			// Insert the CSS into wp_posts
450
			$post_id = wp_insert_post( $post );
@@ 460-466 (lines=7) @@
457
		$safecss_post['post_content_filtered'] = $compressed_css;
458
459
		// Set excerpt to current theme, for display in revisions list
460
		if ( function_exists( 'wp_get_theme' ) ) {
461
			$current_theme = wp_get_theme();
462
			$safecss_post['post_excerpt'] = $current_theme->Name;
463
		}
464
		else {
465
			$safecss_post['post_excerpt'] = get_current_theme();
466
		}
467
468
		// Don't carry over last revision's timestamps, otherwise revisions all have matching timestamps
469
		unset( $safecss_post['post_date'] );