ahmadawais / create-guten-block

📦 A zero-configuration #0CJS developer toolkit for building WordPress Gutenberg block plugins.
https://Awais.dev/cgb-post
MIT License
3.15k stars 328 forks source link

blockNamePHPLower causes issue when its running as a function n ame #306

Open blachawk opened 2 years ago

blachawk commented 2 years ago

Can a developer on this project please explain what is going on here with this function name format on your init.php file, which throws an error in VSCode....

Line 30:

 function <% blockNamePHPLower %>_cgb_block_assets() { // phpcs:ignore
    // Register block styles for both frontend + backend.
    .....
}

why is the function name setup that way in this php file?????? its a problem. how do we fix that? function <% blockNamePHPLower %>

why would anyone write a function name that way in a php file?????

what would be an alternative way to bring blockNamePHPLower into this area, without the invalid naming convention used above?