From 39ab546900e5b1a3412ff71a0d8996838b57d0a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Tue, 11 Feb 2020 13:24:56 +0100 Subject: [PATCH] Fire block settings hook in edit-site --- lib/edit-site-page.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/edit-site-page.php b/lib/edit-site-page.php index 8fffad69ef6f3b..a85d0bb8ec39a8 100644 --- a/lib/edit-site-page.php +++ b/lib/edit-site-page.php @@ -80,6 +80,11 @@ function gutenberg_edit_site_init( $hook ) { apply_filters( 'template_include', null ); $settings['templateId'] = $_wp_current_template_id; + // This is so other parts of the code can hook their own settings. + // Example: Global Styles. + global $post; + $settings = apply_filters( 'block_editor_settings', $settings, $post ); + // Initialize editor. wp_add_inline_script( 'wp-edit-site',