Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
wp scaffold block using --theme outputs the wrong code? #127
Today I tried using scaffold to create a block for gutenberg, I was using the --theme option. What me and my colleague found out is that the wp cli still implements plugin_url instead of something for the theme, and we have the following fix for it;
In code of the block e.g. 'blocks/my-custom-block.php'
And instead of:
The only thing you have to do next is go to your functions.php in the theme and paste this:
I hope this helps some people out!