From 5676d622f485cd8a586c54a8a0f76e9d21995aa3 Mon Sep 17 00:00:00 2001 From: arthur791004 Date: Mon, 5 Aug 2024 14:06:59 +0800 Subject: [PATCH] MU WPCOM: Only load ETK features for wpcom users (2nd try) (#38708) * MU WPCOM: Only load ETK features for wpcom users * changelog * Load etk features on frontend page --- .../changelog/feat-only-load-etk-features-for-wpcom-user | 4 ++++ .../packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 projects/packages/jetpack-mu-wpcom/changelog/feat-only-load-etk-features-for-wpcom-user diff --git a/projects/packages/jetpack-mu-wpcom/changelog/feat-only-load-etk-features-for-wpcom-user b/projects/packages/jetpack-mu-wpcom/changelog/feat-only-load-etk-features-for-wpcom-user new file mode 100644 index 0000000000000..fc7872a3af6f3 --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/feat-only-load-etk-features-for-wpcom-user @@ -0,0 +1,4 @@ +Significance: minor +Type: changed + +MU WPCOM: Only load ETK features for wpcom users diff --git a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php index 32dfd66c452ef..bda01ee2212c7 100644 --- a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php +++ b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php @@ -153,6 +153,10 @@ public static function load_wpcom_user_features() { * Can be moved back to load_features() once the feature no longer exists in the ETK plugin. */ public static function load_etk_features() { + if ( is_admin() && ! is_wpcom_user() ) { + return; + } + require_once __DIR__ . '/features/block-editor/custom-line-height.php'; require_once __DIR__ . '/features/block-inserter-modifications/block-inserter-modifications.php'; require_once __DIR__ . '/features/hide-homepage-title/hide-homepage-title.php';