Browse Source

Restore the Customizer

Matt Wiebe 4 years ago
parent
commit
cbfecf8a57
1 changed files with 10 additions and 0 deletions
  1. 10 0
      blockbase/functions.php

+ 10 - 0
blockbase/functions.php

@@ -95,6 +95,16 @@ function blockbase_fonts_url() {
 	return esc_url_raw( 'https://fonts.googleapis.com/css2?' . implode( '&', $font_families ) );
 }
 
+/**
+ * Restores the Customizer since we still rely on it.
+ */
+function blockbase_restore_customizer() {
+	remove_action( 'admin_menu', 'gutenberg_remove_legacy_pages' );
+}
+add_action( 'init', 'blockbase_restore_customizer' );
+// For WPcom REST API requests to work properly.
+add_action( 'restapi_theme_init', 'blockbase_restore_customizer', 11 );
+
 /**
  * Customize Global Styles
  */