Register a block template.
$template_namestringrequired
plugin_uri//template_name.$argsarray|stringoptional
title stringdescription stringcontent stringpost_types string[]plugin stringDefault:array()
function register_block_template( $template_name, $args = array() ) {
return WP_Block_Templates_Registry::get_instance()->register( $template_name, $args );
}
| Version | Description |
|---|---|
| 6.7.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/register_block_template