From 1c9ddd2507f377ba6966a252b5fc882ff1d3cb22 Mon Sep 17 00:00:00 2001 From: ray Date: Sun, 16 Aug 2020 17:27:19 +0100 Subject: [PATCH] do not use global variables --- index.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index f67ebf9..4c676fa 100644 --- a/index.php +++ b/index.php @@ -1,9 +1,8 @@ >'; -$block_slug = basename( dirname( __FILE__ ) ); - add_action( 'init', function() { + $block_namespace = '<>'; + $block_slug = '<>'; + global $block_slug, $block_namespace; if ( ! function_exists( 'register_block_type' ) ) {