浏览代码

Moved wpcom concerns to wpcom.php

Jason Crist 4 年之前
父节点
当前提交
f29e7cc08a
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 0 2
      blockbase/functions.php
  2. 6 0
      blockbase/inc/wpcom.php

+ 0 - 2
blockbase/functions.php

@@ -102,8 +102,6 @@ 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

+ 6 - 0
blockbase/inc/wpcom.php

@@ -15,3 +15,9 @@ function blockbase_wpcom_scripts() {
 	wp_enqueue_style( 'blockbase-wpcom-style', get_template_directory_uri() . '/inc/wpcom-style.css', array( 'blockbase-ponyfill' ) );
 }
 add_action( 'wp_enqueue_scripts', 'blockbase_wpcom_scripts' );
+
+/**
+ * Restores the Customizer since we still rely on it.
+ * (For WPcom REST API requests to work properly.)
+ */
+add_action( 'restapi_theme_init', 'blockbase_restore_customizer', 11 );