diff --git a/README.md b/README.md index 4ce3f2e..3fd121c 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,8 @@ -**TODO** - currently the block name is hardcoded to `svg` and theme is `room-vw`. -Need to use templating to create a `.php` file (based on `svg.php)` -with the correct theme/block names. - - ## Usage +Edit `index.php` and `.scss` files, so that the correct block name and +namespace are used. + ```sh npm install diff --git a/index.php b/index.php index 2440b1c..32f957e 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,8 @@ >' ) + +$block_namespace = BLOCK_NAMESPACE; $block_slug = basename( dirname( __FILE__ ) ); -// TODO calculate this correctly whether this file is within a theme or plugin -$block_namespace = get_option( 'stylesheet' ); add_action( 'init', function() { global $block_slug, $block_namespace;