Updated icon SVG location inside of registerBlockType.#71290
Updated icon SVG location inside of registerBlockType.#71290lewisself64 wants to merge 1 commit intoWordPress:trunkfrom lewisself64:patch-1
Conversation
Updated icon SVG location inside of registerBlockType to use "src".
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @lewisself64! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
|
Thanks for contributing, @lewisself64! Can you share an example of your icon or how to reproduce this problem you're describing? The documentation isn't outdated. The |
|
Thanks for this. When following the tutorial I used the following snippet similar to the one shown on the documentation. With the code above I was not getting the desired output and it was showing the block default icon for me. However, I have finished the tutorial and changing the code back seems to work fine now. It's possible I was not compiling or something which would make sense why it's working now but wasn't before. So you can disregard this! Apologies. |
|
Thanks for the update, @lewisself64! |
Updated icon SVG location inside of registerBlockType to updated location.
Why?
Current documentation is out of date and not working when adding custom SVG via instructions.
How?
Updated code inside of documentation to allow custom icon for gutenberg block.