Things seems unnecessary. #53176
Arifursdev
started this conversation in
Developer Experience
Replies: 1 comment 1 reply
-
The short answer is that you don't have to do this in Javascript. The preferred method is using a https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/ If you add a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was starting to create something with the block after few months for trying it for the first time. some major issue I noticed, I'm fan of doing almost all things in PHP only speaking of WordPress backend, which was always been this way, like registering new block, adding things to customizer panel etc.
Instead of this:
so we define title, icon , category, attributes, render callback, editor script. and that's not enough. you have redo the exact same thing in JS even title, icon, category, save, and edit callback which was supposed to be render_callback. its not even optional, if you don't give it a save and edit callback it won't work.
Like why??
Why not this:
Beta Was this translation helpful? Give feedback.
All reactions