Completed
Push — master ( 14813c...0a2c27 )
by Virginia
08:28
created
includes/gutenberg.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,8 +26,9 @@  discard block
 block discarded – undo
26 26
  */
27 27
 function add_gutenberg_compatible_body_class( $classes ) {
28 28
 	// if ( ! is_home() && ! is_front_page() ).
29
-	if ( is_page() || is_page_template() || is_single() )
30
-		$classes[] = 'gutenberg-compatible-template';
29
+	if ( is_page() || is_page_template() || is_single() ) {
30
+			$classes[] = 'gutenberg-compatible-template';
31
+	}
31 32
 
32 33
 	// Add a class if the page is using the Content and Media block.
33 34
 	$post = get_post();
@@ -45,7 +46,8 @@  discard block
 block discarded – undo
45 46
 
46 47
 // Add custom class for templates that are using the Gutenberg editor.
47 48
 add_action('body_class', function( $classes ) {
48
-	if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) && ( ! is_search() ) && ( ! is_archive() ) )
49
-		$classes[] = 'using-gutenberg';
49
+	if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) && ( ! is_search() ) && ( ! is_archive() ) ) {
50
+			$classes[] = 'using-gutenberg';
51
+	}
50 52
 	return $classes;
51 53
 });
Please login to merge, or discard this patch.