Code Duplication    Length = 7-7 lines in 2 locations

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

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