wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp-includes/block-template-utils.php › WordPress File

Fonctions27
Utilities used to fetch and create templates and template parts.


Function Short description
block_footer_areaPrints the footer block template part.
block_header_areaPrints the header block template part.
block_template_partPrints a block template part.
get_allowed_block_template_part_areasReturns a filtered list of allowed area values for template parts.
get_block_file_templateRetrieves a unified template object based on a theme file.
get_block_templateRetrieves a single unified template object using its id.
get_block_templatesRetrieves a list of unified template objects based on a query.
get_block_theme_foldersFor 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_typesReturns a filtered list of default template types, containing their localized titles and descriptions.
get_template_hierarchyGets the template hierarchy for the given template slug to be created.
inject_ignored_hooked_blocks_metadata_attributesInject ignoredHookedBlocks metadata attributes into a template or template part.
wp_generate_block_templates_export_fileCreates 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_ignoredDetermines whether a theme directory should be ignored during export.
_add_block_template_infoAttempts to add custom template information to the template item.
_add_block_template_part_area_infoAttempts to add the template part's area information to the input template.
_build_block_template_object_from_post_objectBuilds a block template object from a post object.
_build_block_template_result_from_fileBuilds a unified template object based on a theme file.
_build_block_template_result_from_postBuilds a unified template object based a post Object.
_filter_block_template_part_areaChecks whether the input 'area' is a supported value.
_flatten_blocksReturns an array containing the references of the passed blocks and their inner blocks.
_get_block_templates_filesRetrieves the template files from the theme.
_get_block_templates_pathsFinds all nested template part file paths in a theme's directory.
_get_block_template_fileRetrieves the template file from the theme for a given slug.
_inject_theme_attribute_in_template_part_blockInjects the active theme's stylesheet as a `theme` attribute into a given template part block.
_remove_theme_attribute_from_template_part_blockRemoves the `theme` attribute from a given template part block.
_wp_build_title_and_description_for_single_post_type_block_templateBuilds the title and description of a post-specific template based on the underlying referenced post.
_wp_build_title_and_description_for_taxonomy_block_templateBuilds the title and description of a taxonomy-specific template based on the underlying entity referenced.