Przeglądaj źródła

Merge pull request #3482 from Automattic/fix/getting-data-from-theme-json

Blank Canvas Blocks: Fix getting data from theme json
Ben Dwyer 4 lat temu
rodzic
commit
ff64630671
1 zmienionych plików z 13 dodań i 7 usunięć
  1. 13 7
      blank-canvas-blocks/functions.php

+ 13 - 7
blank-canvas-blocks/functions.php

@@ -17,17 +17,23 @@ if ( ! function_exists( 'blank_canvas_blocks_support' ) ) :
 
 		// Add support for editor styles.
 		add_theme_support( 'editor-styles' );
-
-		// Enqueue editor styles.
-		add_editor_style( array(
-			blank_canvas_blocks_fonts_url(),
-			'/assets/ponyfill.css'
-		) );
-
     }
     add_action( 'after_setup_theme', 'blank_canvas_blocks_support' );
 endif;
 
+/**
+ *
+ * Enqueue scripts and styles.
+ */
+function blank_canvas_editor_styles() {
+	// Enqueue editor styles.
+	add_editor_style( array(
+		blank_canvas_blocks_fonts_url(),
+		'/assets/ponyfill.css'
+	) );
+}
+add_action( 'admin_init', 'blank_canvas_editor_styles' );
+
 /**
  *
  * Enqueue scripts and styles.