From 8677e8626db730fa59d78d90854ede47eccc65da Mon Sep 17 00:00:00 2001 From: Marius Cristea Date: Thu, 15 Jun 2017 13:01:37 +0200 Subject: [PATCH] Added hook to allow extending of gutenberg editor in plugin/themes. Ref: #1184 --- lib/client-assets.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/client-assets.php b/lib/client-assets.php index f690eaf106a023..f7f2354ad63603 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -371,5 +371,12 @@ function gutenberg_scripts_and_styles( $hook ) { array( 'wp-components', 'wp-blocks' ), filemtime( gutenberg_dir_path() . 'editor/build/style.css' ) ); + + global $hook_suffix; + /** + * Hook to allow extending of gutenberg editor in plugin/themes. + */ + do_action( 'block_enqueue_script', $hook_suffix ); + } add_action( 'admin_enqueue_scripts', 'gutenberg_scripts_and_styles' );