WPDev.one
Core Function
View Source on Trac ↗

_build_block_template_object_from_post_object()

_build_block_template_object_from_post_object( mixed $post, mixed $terms = array(), mixed $meta = array() )

Builds a block template object from a post object.

Parameters 1 required

Name / Type Description
$post
WP_Post

Template post.

Required
$terms
array

Additional terms to inform the template object.

$meta
array

Additional meta fields to inform the template object.

Return Value

((WP_Block_Template)
| WP_Error) Template or error object.

Function Information

Since Version
6.5.3
Source File
wp-includes/block-template-utils.php
Advertisement