From e5035544c1f3906bfed3f4331843e322a8ae233a Mon Sep 17 00:00:00 2001 From: Alex Kirk Date: Wed, 3 Apr 2024 16:21:50 +0200 Subject: [PATCH] Don't enqueue scripts in embeds --- src/plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugin.php b/src/plugin.php index 21da21c..986baa3 100644 --- a/src/plugin.php +++ b/src/plugin.php @@ -21,7 +21,7 @@ function main() { function register_scripts() { add_action( - 'init', + 'wp_enqueue_scripts', function () { $json_data = wp_json_encode( array(