register_block_template


register_block_template ( $template_name, $args = array() )

Parameters:
  • (string) template_name Template name in the form of `plugin_uri//template_name`.
  • (array|string) args { @type string $title Optional. Title of the template as it will be shown in the Site Editor and other UI elements. @type string $description Optional. Description of the template as it will be shown in the Site Editor. @type string $content Optional. Default content of the template that will be used when the template is rendered or edited in the editor. @type string[] $post_types Optional. Array of post types to which the template should be available. @type string $plugin Optional. Slug of the plugin that registers the template. }
Returns:
  • (WP_Block_Template|WP_Error) The registered template object on success, WP_Error object on failure.
Defined at:

Description

Register a block template.

Related Functions

unregister_block_template, register_block_type, register_block_style, resolve_block_template, get_block_template

Top Google Results

User discussions

wpseek mobile