Skip to content

Commit

Permalink
Fire block settings hook in edit-site
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Feb 11, 2020
1 parent 7ac9ec8 commit 39ab546
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/edit-site-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 39ab546

Please sign in to comment.