_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:871
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
- Scaling
- Scales with input
- Instructions
- 61–222
- Plugin surface
- None
- Called by
- 5
Reaches the database via get_post().
The body loops, so the work grows with what you pass in.
Executed per call on PHP 8.5, depending on the branch taken. The body compiles to 353.
Nothing here hands control to plugin code.
5 places in core call this, so the cost is paid more often than your own code shows.
What it touches
- querycontent query
get_post()called directly - serializeserialisation
json_decode()called directly - cacheobject cache
wp_cache_add()one call below _build_block_template_result_from_post() - hookthird-party callbacks
apply_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.
| When | Instructions | Calls it makes |
|---|---|---|
| always | 61 | wp_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–87 | wp_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–125 | wp_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() |
| always | 88–90 | wp_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–111 | wp_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() |
| always | 97–128 | wp_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–116 | wp_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–108 | wp_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–111 | wp_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–114 | wp_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–149 | wp_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() | 100 | wp_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–109 | wp_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–115 | wp_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–154 | wp_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–146 | wp_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–149 | wp_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–152 | wp_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() && $matches | 109 | wp_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() && $matches | 109–110 | wp_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–138 | wp_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–147 | wp_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–112 | wp_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–133 | wp_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–121 | wp_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–153 | wp_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–118 | wp_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() && $matches | 118–147 | wp_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() && $matches | 118–148 | wp_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–139 | wp_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–150 | wp_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() && !$taxonomies | 121–137 | wp_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–138 | wp_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_types | 122–132 | wp_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–130 | wp_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–133 | wp_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–136 | wp_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–171 | wp_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) | 122 | wp_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–159 | wp_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) | 124 | wp_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–156 | wp_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–144 | wp_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–136 | wp_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–139 | wp_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–142 | wp_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–177 | wp_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) | 128 | wp_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() && !$taxonomies | 130–175 | wp_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–176 | wp_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_types | 131–170 | wp_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_types | 131 | wp_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–168 | wp_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–171 | wp_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–174 | wp_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) | 131 | wp_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–132 | wp_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–160 | wp_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–162 | wp_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–141 | wp_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–182 | wp_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–143 | wp_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–174 | wp_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–177 | wp_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–180 | wp_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) | 137 | wp_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–138 | wp_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–166 | wp_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_types | 140–167 | wp_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–169 | wp_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–170 | wp_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–159 | wp_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–149 | wp_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–154 | wp_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–179 | wp_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) | 144 | wp_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–181 | wp_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) | 146 | wp_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–175 | wp_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–176 | wp_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–153 | wp_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–165 | wp_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–160 | wp_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–197 | wp_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–187 | wp_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) | 152 | wp_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–192 | wp_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) | 153 | wp_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–182 | wp_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–184 | wp_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–191 | wp_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) | 156 | wp_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–163 | wp_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–203 | wp_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–198 | wp_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) | 159 | wp_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–190 | wp_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–189 | wp_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–169 | wp_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–194 | wp_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–201 | wp_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) | 166 | wp_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–195 | wp_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–175 | wp_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–207 | wp_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) | 172 | wp_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–181 | wp_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–204 | wp_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–213 | wp_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) | 178 | wp_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–210 | wp_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–219 | wp_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) | 184 | wp_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–216 | wp_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–222 | wp_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
| PHP | Compiled | Executed | Branches | Notes |
|---|---|---|---|---|
| 8.6-dev | 353 | 61–222 | 38 | |
| 8.5 | 353 | 61–222 | 38 | |
| 8.4 | 353 | 61–222 | 38 | 6 fewer instructions than PHP 8.3 |
| 8.3 | 359 | 61–222 | 38 | |
| 8.2 | 359 | 61–222 | 38 | 1 more instruction than PHP 8.1 |
| 8.1 | 358 | 61–229 | 38 | 6 fewer instructions than PHP 7.4 |
| 7.4 | 364 | 61–232 | 38 |
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
- wp_is_post_revision()Determines if the specified post is a revision.
- get_post()Retrieves post data given a post ID or post object.
- get_the_terms()Retrieves the terms of the taxonomy that are attached to the post.
- is_wp_error()Checks whether the given variable is a WordPress Error.
- __()Retrieves the translation of $text.
- get_post_meta()Retrieves a post meta field for the given post ID.
- _build_block_template_object_from_post_object()Builds a block template object from a post object.
- get_users()Retrieves list of users matching criteria.
- _wp_build_title_and_description_for_single_post_type_block_template()Builds the title and description of a post-specific template based on the underlying referenced post.
- get_post_types()Gets a list of all registered post type objects.
- _wp_build_title_and_description_for_taxonomy_block_template()Builds the title and description of a taxonomy-specific template based on the underlying entity referenced.
- get_taxonomies()Retrieves a list of registered taxonomy names or objects.
Show all 18
- get_comment_delimited_block_content()Returns the content of a block, including comment delimiters.
- apply_block_hooks_to_content()Runs the hooked blocks algorithm on the given content.
- remove_serialized_parent_block()Accepts the serialized markup of a block and its inner blocks, and returns serialized markup of the inner blocks.
- WP_Error::__construct()Initializes the error.
- WP_Block_Templates_Registry::get_instance()::get_by_slug()
- WP_Block_Templates_Registry::get_instance()Utility method to retrieve the main instance of the class.
Used by · 5
- WP_REST_Template_Autosaves_Controller::prepare_item_for_response()Prepares the item for the REST response.
- WP_REST_Template_Revisions_Controller::prepare_item_for_response()Prepares the item for the REST response.
- get_block_template()Retrieves a single unified template object using its id.
- get_block_templates()Retrieves a list of unified template objects based on a query.
- render_block_core_template_part()Renders the `core/template-part` block on the server.
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.
Signature, return type and hooks compared across 5 parsed releases.
modified property to template objects.from the docblockAbout this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 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.