Skip to content

Commit

Permalink
fix: remove FSE notice from the customizer
Browse files Browse the repository at this point in the history
  • Loading branch information
abaicus committed Jan 18, 2023
1 parent 7449ebf commit fe8025b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions inc/compatibility/fse.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class Fse {
* Theme mod used for main flag.
*/
const FSE_ENABLED_SLUG = 'neve_enable_fse_templates';

const CUSTOMIZER_NOTIFICATION = 'site_editor_block_theme_notice';

/**
* Templates.
*
Expand Down Expand Up @@ -541,5 +544,13 @@ public function add_styles() {
';

wp_add_inline_style( Loader::CUSTOMIZER_STYLE_HANDLE, Dynamic_Css::minify_css( $css ) );

$js = '
wp.customize.bind("ready", function() {
wp.customize.notifications.remove("site_editor_block_theme_notice");
});
';

wp_add_inline_script( 'react-controls', $js );
}
}

0 comments on commit fe8025b

Please sign in to comment.