Complete the code to register a new block in WordPress.
register_block_type([1]);The register_block_type function requires the block name as a string, including the namespace and block name separated by a slash.
Complete the code to enqueue the block's editor script during block registration.
register_block_type('my-plugin/my-block', { 'editor_script': [1] });
The editor_script property expects the handle of the registered script as a string, so it must be quoted.
Fix the error in the block registration code by completing the missing property.
register_block_type('my-plugin/my-block', { 'render_callback': [1] });
The render_callback property expects a string containing the name of the function (callable by name) to render the block on the server side.
Fill both blanks to register a block with a style and script.
register_block_type('my-plugin/my-block', { 'style': [1], 'script': [2] });
The style and script properties expect the handles of the registered style and script as strings.
Fill all three blanks to register a block with editor style, editor script, and render callback.
register_block_type('my-plugin/my-block', { 'editor_style': [1], 'editor_script': [2], 'render_callback': [3] });
The editor_style and editor_script properties require string handles of registered assets, while render_callback requires a string with the function name (callable).