do not use global variables
This commit is contained in:
parent
6bb91ed855
commit
1c9ddd2507
|
@ -1,9 +1,8 @@
|
|||
<?php
|
||||
|
||||
$block_namespace = '<<INSERT BLOCK NAMESPACE HERE>>';
|
||||
$block_slug = basename( dirname( __FILE__ ) );
|
||||
|
||||
add_action( 'init', function() {
|
||||
$block_namespace = '<<INSERT BLOCK NAMESPACE HERE>>';
|
||||
$block_slug = '<<INSERT BLOCK SLUG HERE>>';
|
||||
|
||||
global $block_slug, $block_namespace;
|
||||
|
||||
if ( ! function_exists( 'register_block_type' ) ) {
|
||||
|
|
Loading…
Reference in New Issue