You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Examples consists of 3 files: the CSS file, the JS file and the PHP file which enqueues the files.
Files could either be prefixed with their block name (slug) to separate them more easily,
-or they could all be named block-style.js and block-style.css and only be separated by placing them in their respective folders, and by the file headers.
By not adding a prefix to the JS and CSS file names, and by not adding a style specific prefix to the file handles, the PHP file could essentially be removed from the examples, because all PHP files would be identical.
Instead an example PHP file could be placed in the main folder.
The decision needs to be made with a possible plugin generator in mind, where the PHP file would not be used anyway.
The text was updated successfully, but these errors were encountered:
Examples consists of 3 files: the CSS file, the JS file and the PHP file which enqueues the files.
Files could either be prefixed with their block name (slug) to separate them more easily,
-or they could all be named block-style.js and block-style.css and only be separated by placing them in their respective folders, and by the file headers.
By not adding a prefix to the JS and CSS file names, and by not adding a style specific prefix to the file handles, the PHP file could essentially be removed from the examples, because all PHP files would be identical.
Instead an example PHP file could be placed in the main folder.
The decision needs to be made with a possible plugin generator in mind, where the PHP file would not be used anyway.
The text was updated successfully, but these errors were encountered: