Skip to content

Commit

Permalink
Fixed a type and made the whole explaination more clear. (#30487)
Browse files Browse the repository at this point in the history
* Fixed a type and made the whole explaination more clear.

* Update docs/getting-started/tutorials/create-block/block-code.md

Co-authored-by: Marcus Kazmierczak <[email protected]>
  • Loading branch information
janw-me and mkaz authored Apr 7, 2021
1 parent 8de9985 commit 8c8feab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/getting-started/tutorials/create-block/block-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function create_block_gutenpride_block_init() {
add_action( 'init', 'create_block_gutenpride_block_init' );
```

This function handles that all style en js files in the `build` folder get handles that are passed on to the `wp_register_style` function.
This function checks the `block.json` file for js and css files, and will pass them on to [enqueue](https://developer.wordpress.org/themes/basics/including-css-javascript/) these files, so they are loaded on the appropriate pages.

The `build/index.css` is compiled from `src/editor.scss` and loads only within the editor, and after the `style-index.css`.
The `build/style-index.css` is compiled from `src/style.scss` and loads in both the editor and front-end — published post view.
Expand Down

0 comments on commit 8c8feab

Please sign in to comment.