wppaste
WordPress

_build_block_template_result_from_post( WP_Post $post ): WP_Block_Template|WP_Error

Since
5.9.0, 6.3.0, 6.4.0
Source
wp-includes/block-template-utils.php:900
Builds a unified template object based a post Object.

Compatibility

WordPress
since 6.4.0
PHP
7.4–8.6-dev
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0), and compiles on PHP 7.4 through 8.6-dev.

Parameters

$postWP_Post
Template post.

Return value

WP_Block_Template|WP_Error
Template or error object.

Performance profile

How much work a call to _build_block_template_result_from_post() does, and what it touches: the algorithmic scaling, the Zend instruction count per call across PHP versions, the hooks it hands control to, and the core code that calls it. Measured from the compiled opcodes, not a stopwatch, so every number is identical on any machine running the same PHP version, and every function in core is ranked by cost.

Cost class
Heavy

Reaches the database via get_post().

Scaling
Scales with input

The body loops, so the work grows with what you pass in.

Instructions
61–222

Executed per call on PHP 8.5, depending on the branch taken. The body compiles to 353.

Plugin surface
None

Nothing here hands control to plugin code.

Called by
6

6 places in core call this, so the cost is paid more often than your own code shows.

What it touches

  • querycontent queryget_post()called directly
  • serializeserialisationjson_decode()called directly
  • cacheobject cachewp_cache_add()one call below _build_block_template_result_from_post()
  • hookthird-party callbacksapply_filters()one call below _build_block_template_result_from_post()

Further down the call graph this can also reach option and transient. Those are the worst case, several calls deep and usually down an error path, not what a normal call pays.

What one call costs · 115 distinct outcomes

One number would be a lie: the work depends on which branch runs. These are every distinct cost _build_block_template_result_from_post() can have, taken from its control-flow graph on PHP 8.5.

WhenInstructionsCalls it makes
always61wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error()
!is_wp_error()79–87wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), apply_block_hooks_to_content()
!is_wp_error()88–125wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
always88–90wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), apply_block_hooks_to_content()
!is_wp_error() && empty($template)91–111wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), apply_block_hooks_to_content()
always97–128wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && preg_match()99–116wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_taxonomies(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && preg_match()100–108wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_single_post_type_block_template(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && preg_match()100–111wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && preg_match()100–114wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_taxonomy_block_template(), apply_block_hooks_to_content()
!is_wp_error() && empty($template)100–149wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
empty($template) && !preg_match()100wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), apply_block_hooks_to_content()
103 further outcomes, up to 222 instructions
!is_wp_error() && empty($existing_ignored_hooked_blocks)101–109wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && !empty($existing_ignored_hooked_blocks)107–115wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match()108–154wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_taxonomies(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && preg_match()109–146wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_single_post_type_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && preg_match()109–149wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && preg_match()109–152wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_taxonomy_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
empty($template) && preg_match() && $matches109wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_single_post_type_block_template(), apply_block_hooks_to_content()
empty($template) && preg_match() && $matches109–110wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), apply_block_hooks_to_content()
empty($template) && !preg_match()109–138wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
!is_wp_error() && empty($existing_ignored_hooked_blocks)110–147wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($existing_ignored_hooked_blocks)110–112wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && empty($existing_ignored_hooked_blocks)113–133wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && empty($users)115–121wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), apply_block_hooks_to_content()
!is_wp_error() && !empty($existing_ignored_hooked_blocks)116–153wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!empty($existing_ignored_hooked_blocks)116–118wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches118–147wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_single_post_type_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
empty($template) && preg_match() && $matches118–148wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && !empty($existing_ignored_hooked_blocks)119–139wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($existing_ignored_hooked_blocks)119–150wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !$taxonomies121–137wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_taxonomies(), strncmp(), _wp_build_title_and_description_for_taxonomy_block_template(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && preg_match() && empty($existing_ignored_hooked_blocks)121–138wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_taxonomies(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !$post_types122–132wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), strncmp(), _wp_build_title_and_description_for_single_post_type_block_template(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && preg_match() && empty($existing_ignored_hooked_blocks)122–130wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_single_post_type_block_template(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && empty($existing_ignored_hooked_blocks)122–133wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && empty($existing_ignored_hooked_blocks)122–136wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_taxonomy_block_template(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && empty($existing_ignored_hooked_blocks)122–171wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && !preg_match() && empty($existing_ignored_hooked_blocks)122wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && empty($users)124–159wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
empty($template) && preg_match() && $matches && empty($users)124wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), apply_block_hooks_to_content()
!empty($existing_ignored_hooked_blocks)125–156wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !empty($existing_ignored_hooked_blocks)127–144wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_taxonomies(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !empty($existing_ignored_hooked_blocks)128–136wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_single_post_type_block_template(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !empty($existing_ignored_hooked_blocks)128–139wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !empty($existing_ignored_hooked_blocks)128–142wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_taxonomy_block_template(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && !empty($existing_ignored_hooked_blocks)128–177wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && !preg_match() && !empty($existing_ignored_hooked_blocks)128wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !$taxonomies130–175wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_taxonomies(), strncmp(), _wp_build_title_and_description_for_taxonomy_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && preg_match() && empty($existing_ignored_hooked_blocks)130–176wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_taxonomies(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !$post_types131–170wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), strncmp(), _wp_build_title_and_description_for_single_post_type_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
empty($template) && preg_match() && $matches && !$post_types131wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), strncmp(), _wp_build_title_and_description_for_single_post_type_block_template(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && preg_match() && empty($existing_ignored_hooked_blocks)131–168wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_single_post_type_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && empty($existing_ignored_hooked_blocks)131–171wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && empty($existing_ignored_hooked_blocks)131–174wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_taxonomy_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && empty($existing_ignored_hooked_blocks)131wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_single_post_type_block_template(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && empty($existing_ignored_hooked_blocks)131–132wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && !preg_match() && empty($existing_ignored_hooked_blocks)131–160wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && empty($users)133–162wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && preg_match() && !empty($users)135–141wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && preg_match() && !empty($existing_ignored_hooked_blocks)136–182wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_taxonomies(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && empty($users) && empty($existing_ignored_hooked_blocks)137–143wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !empty($existing_ignored_hooked_blocks)137–174wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_single_post_type_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !empty($existing_ignored_hooked_blocks)137–177wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !empty($existing_ignored_hooked_blocks)137–180wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_taxonomy_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !empty($existing_ignored_hooked_blocks)137wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_single_post_type_block_template(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !empty($existing_ignored_hooked_blocks)137–138wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && !preg_match() && !empty($existing_ignored_hooked_blocks)137–166wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !$post_types140–167wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), strncmp(), _wp_build_title_and_description_for_single_post_type_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
empty($template) && preg_match() && $matches && empty($existing_ignored_hooked_blocks)140–169wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_single_post_type_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && empty($existing_ignored_hooked_blocks)140–170wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !$taxonomies && empty($existing_ignored_hooked_blocks)143–159wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_taxonomies(), strncmp(), _wp_build_title_and_description_for_taxonomy_block_template(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && empty($users) && !empty($existing_ignored_hooked_blocks)143–149wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !$post_types && empty($existing_ignored_hooked_blocks)144–154wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), strncmp(), _wp_build_title_and_description_for_single_post_type_block_template(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !empty($users)144–179wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
empty($template) && preg_match() && $matches && !empty($users)144wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && preg_match() && empty($users) && empty($existing_ignored_hooked_blocks)146–181wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && empty($users) && empty($existing_ignored_hooked_blocks)146wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !empty($existing_ignored_hooked_blocks)146–175wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), _wp_build_title_and_description_for_single_post_type_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !empty($existing_ignored_hooked_blocks)146–176wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !empty($users)147–153wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), __(), sprintf(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && preg_match() && !$taxonomies && !empty($existing_ignored_hooked_blocks)149–165wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_taxonomies(), strncmp(), _wp_build_title_and_description_for_taxonomy_block_template(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !$post_types && !empty($existing_ignored_hooked_blocks)150–160wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), strncmp(), _wp_build_title_and_description_for_single_post_type_block_template(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !$taxonomies && empty($existing_ignored_hooked_blocks)152–197wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_taxonomies(), strncmp(), _wp_build_title_and_description_for_taxonomy_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && empty($users) && !empty($existing_ignored_hooked_blocks)152–187wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && empty($users) && !empty($existing_ignored_hooked_blocks)152wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !$post_types && empty($existing_ignored_hooked_blocks)153–192wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), strncmp(), _wp_build_title_and_description_for_single_post_type_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !$post_types && empty($existing_ignored_hooked_blocks)153wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), strncmp(), _wp_build_title_and_description_for_single_post_type_block_template(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !empty($users)153–182wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
empty($template) && preg_match() && $matches && empty($users) && empty($existing_ignored_hooked_blocks)155–184wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !empty($users)156–191wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), __(), sprintf(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
empty($template) && preg_match() && $matches && !empty($users)156wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), __(), sprintf(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && preg_match() && !empty($users) && empty($existing_ignored_hooked_blocks)157–163wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !$taxonomies && !empty($existing_ignored_hooked_blocks)158–203wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_taxonomies(), strncmp(), _wp_build_title_and_description_for_taxonomy_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !$post_types && !empty($existing_ignored_hooked_blocks)159–198wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), strncmp(), _wp_build_title_and_description_for_single_post_type_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !$post_types && !empty($existing_ignored_hooked_blocks)159wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), strncmp(), _wp_build_title_and_description_for_single_post_type_block_template(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && empty($users) && !empty($existing_ignored_hooked_blocks)161–190wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !$post_types && empty($existing_ignored_hooked_blocks)162–189wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), strncmp(), _wp_build_title_and_description_for_single_post_type_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !empty($users) && !empty($existing_ignored_hooked_blocks)163–169wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !empty($users)165–194wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), __(), sprintf(), ::WP_Block_Templates_Registry(), ->get_by_slug(), apply_block_hooks_to_content()
!is_wp_error() && empty($template) && preg_match() && !empty($users) && empty($existing_ignored_hooked_blocks)166–201wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !empty($users) && empty($existing_ignored_hooked_blocks)166wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !$post_types && !empty($existing_ignored_hooked_blocks)168–195wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), get_post_types(), strncmp(), _wp_build_title_and_description_for_single_post_type_block_template(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !empty($users) && empty($existing_ignored_hooked_blocks)169–175wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), __(), sprintf(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !empty($users) && !empty($existing_ignored_hooked_blocks)172–207wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !empty($users) && !empty($existing_ignored_hooked_blocks)172wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !empty($users) && !empty($existing_ignored_hooked_blocks)175–181wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), __(), sprintf(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !empty($users) && empty($existing_ignored_hooked_blocks)175–204wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !empty($users) && empty($existing_ignored_hooked_blocks)178–213wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), __(), sprintf(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !empty($users) && empty($existing_ignored_hooked_blocks)178wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), __(), sprintf(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !empty($users) && !empty($existing_ignored_hooked_blocks)181–210wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
!is_wp_error() && empty($template) && preg_match() && !empty($users) && !empty($existing_ignored_hooked_blocks)184–219wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), __(), sprintf(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !empty($users) && !empty($existing_ignored_hooked_blocks)184wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), __(), sprintf(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !empty($users) && empty($existing_ignored_hooked_blocks)187–216wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), __(), sprintf(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()
empty($template) && preg_match() && $matches && !empty($users) && !empty($existing_ignored_hooked_blocks)193–222wp_is_post_revision(), get_post(), get_the_terms(), is_wp_error(), get_the_terms(), is_wp_error(), get_post_meta(), get_post_meta(), _build_block_template_object_from_post_object(), is_wp_error(), preg_match(), edit_posts(), __(), sprintf(), __(), sprintf(), edit_posts(), __(), sprintf(), ::WP_Block_Templates_Registry(), ->get_by_slug(), get_post_meta(), json_decode(), get_comment_delimited_block_content(), apply_block_hooks_to_content(), remove_serialized_parent_block()

This body has more branch combinations than are worth enumerating, so the table covers the outcomes found first rather than every one that exists.

Across PHP versions

PHPCompiledExecutedBranchesNotes
8.6-dev35361–22238
8.535361–22238
8.435361–222386 fewer instructions than PHP 8.3
8.335961–22238
8.235961–222381 more instruction than PHP 8.1
8.135861–229386 fewer instructions than PHP 7.4
7.436461–23238

An instruction is not a fixed amount of time, so a matching count is not necessarily the same speed; what it rules out is a difference in the work itself.

Uses · 18

Show all 18

Used by · 6

Source code

function _build_block_template_result_from_post( $post ) {	$post_id = wp_is_post_revision( $post );	if ( ! $post_id ) {		$post_id = $post;	}	$parent_post     = get_post( $post_id );	$post->post_name = $parent_post->post_name;	$post->post_type = $parent_post->post_type; 	$terms = get_the_terms( $parent_post, 'wp_theme' ); 	if ( is_wp_error( $terms ) ) {		return $terms;	} 	if ( ! $terms ) {		return new WP_Error( 'template_missing_theme', __( 'No theme is defined for this template.' ) );	} 	$terms = array(		'wp_theme' => $terms[0]->name,	); 	if ( 'wp_template_part' === $parent_post->post_type ) {		$type_terms = get_the_terms( $parent_post, 'wp_template_part_area' );		if ( ! is_wp_error( $type_terms ) && false !== $type_terms ) {			$terms['wp_template_part_area'] = $type_terms[0]->name;		}	} 	$meta = array(		'origin'           => get_post_meta( $parent_post->ID, 'origin', true ),		'is_wp_suggestion' => get_post_meta( $parent_post->ID, 'is_wp_suggestion', true ),	); 	$template = _build_block_template_object_from_post_object( $post, $terms, $meta ); 	if ( is_wp_error( $template ) ) {		return $template;	} 	// Check for a block template without a description and title or with a title equal to the slug.	if ( 'wp_template' === $parent_post->post_type && empty( $template->description ) && ( empty( $template->title ) || $template->title === $template->slug ) ) {		$matches = array(); 		// Check for a block template for a single author, page, post, tag, category, custom post type, or custom taxonomy.		if ( preg_match( '/(author|page|single|tag|category|taxonomy)-(.+)/', $template->slug, $matches ) ) {			$type           = $matches[1];			$slug_remaining = $matches[2]; 			switch ( $type ) {				case 'author':					$nice_name = $slug_remaining;					$users     = get_users(						array(							'capability'     => 'edit_posts',							'search'         => $nice_name,							'search_columns' => array( 'user_nicename' ),							'fields'         => 'display_name',						)					); 					if ( empty( $users ) ) {						$template->title = sprintf(							/* translators: Custom template title in the Site Editor, referencing a deleted author. %s: Author nicename. */							__( 'Deleted author: %s' ),							$nice_name						);					} else {						$author_name = $users[0]; 						$template->title = sprintf(							/* translators: Custom template title in the Site Editor. %s: Author name. */							__( 'Author: %s' ),							$author_name						); 						$template->description = sprintf(							/* translators: Custom template description in the Site Editor. %s: Author name. */							__( 'Template for %s' ),

Changelog

Introduced in 5.9.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

6.4.0
Added support for a revision post to be passed to this function.from the docblock
6.3.0
Added modified property to template objects.from the docblock
5.9.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/block-template-utils.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.