2

I'm using register_block_type to register my blocks.

I'm not sure what is the best hook to use, between init and enqueue_block_editor_assets.

I suppose that enqueue_block_editor_assets it is loaded after, because I can use get_the_ID

What are the pro and cons of both?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.