wpseek.com
A WordPress-centric search engine for devs and theme authors
wp-includes/block-template-utils.php › WordPress File
Functions27
› Utilities used to fetch and create templates and template parts.
Function | Short description |
---|---|
block_footer_area | Prints the footer block template part. |
block_header_area | Prints the header block template part. |
block_template_part | Prints a block template part. |
get_allowed_block_template_part_areas | Returns a filtered list of allowed area values for template parts. |
get_block_file_template | Retrieves a unified template object based on a theme file. |
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. |
get_block_theme_folders | For backward compatibility reasons, block themes might be using block-templates or block-template-parts, this function ensures we fallback to these folders properly. |
get_default_block_template_types | Returns a filtered list of default template types, containing their localized titles and descriptions. |
get_template_hierarchy | Gets the template hierarchy for the given template slug to be created. |
inject_ignored_hooked_blocks_metadata_attributes | Inject ignoredHookedBlocks metadata attributes into a template or template part. |
wp_generate_block_templates_export_file | Creates an export of the current templates and template parts from the site editor at the specified path in a ZIP file. |
wp_is_theme_directory_ignored | Determines whether a theme directory should be ignored during export. |
_add_block_template_info | Attempts to add custom template information to the template item. |
_add_block_template_part_area_info | Attempts to add the template part's area information to the input template. |
_build_block_template_object_from_post_object | Builds a block template object from a post object. |
_build_block_template_result_from_file | Builds a unified template object based on a theme file. |
_build_block_template_result_from_post | Builds a unified template object based a post Object. |
_filter_block_template_part_area | Checks whether the input 'area' is a supported value. |
_flatten_blocks | Returns an array containing the references of the passed blocks and their inner blocks. |
_get_block_templates_files | Retrieves the template files from the theme. |
_get_block_templates_paths | Finds all nested template part file paths in a theme's directory. |
_get_block_template_file | Retrieves the template file from the theme for a given slug. |
_inject_theme_attribute_in_template_part_block | Injects the active theme's stylesheet as a `theme` attribute into a given template part block. |
_remove_theme_attribute_from_template_part_block | Removes the `theme` attribute from a given template part block. |
_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. |
_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. |