From d9c862bb4a78aa61b637a4681d059b064b66ab49 Mon Sep 17 00:00:00 2001 From: schappy Date: Tue, 22 Jul 2025 15:08:42 +0200 Subject: [PATCH 1/2] * changed enqueue script to be added to all admin screens instead of posts only, otherwise gutenberg is missing js for multisite library for pages and custom types --- src/Assets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Assets.php b/src/Assets.php index 27e96695..2b6c921a 100644 --- a/src/Assets.php +++ b/src/Assets.php @@ -34,7 +34,7 @@ public function __construct(PluginProperties $pluginProperties) */ public function enqueueScripts() { - if ('post' !== get_current_screen()->base) { + if (!is_admin()) { return; } From 95c9db8e58aa3080e3c5fac1d7248af914422d2f Mon Sep 17 00:00:00 2001 From: theSCHAPPY Date: Tue, 22 Jul 2025 15:20:28 +0200 Subject: [PATCH 2/2] * also added fix to enqueue_styles --- src/Assets.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Assets.php b/src/Assets.php index 2b6c921a..20b6047c 100644 --- a/src/Assets.php +++ b/src/Assets.php @@ -56,9 +56,9 @@ public function enqueueScripts() */ public function enqueueStyles() { - if ('post' !== get_current_screen()->base) { + if (!is_admin()) { return; - } + } $styleFile = '/assets/css/global-media.css'; wp_register_style(