New and updated in 5.9.0
-
Builds a unified template object based a post Object.
-
Parses wp_template content and injects the active theme’s stylesheet as a theme attribute into each wp_template_part
-
Filters the list of allowed template part area values.
-
Returns a filtered list of default template types, containing their localized titles and descriptions.
-
Filters the list of default template types.
-
Checks whether the input ‘area’ is a supported value.
-
function_get_block_templates_paths()
Finds all nested template part file paths in a theme’s directory.
-
function_get_block_template_file()
Retrieves the template file from the theme for a given slug.
-
function_get_block_templates_files()
Retrieves the template files from the theme.
-
function_add_block_template_info()
Attempts to add custom template information to the template item.
-
Attempts to add the template part’s area information to the input template.
-
function_flatten_blocks()
Returns an array containing the references of the passed blocks and their inner blocks.
-
Returns a filtered list of allowed area values for template parts.
-
functionget_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.
-
Filters whether a post type is considered “viewable”.
-
Filters whether a post status is considered “viewable”.
-
functionwp_get_loading_attr_default()
Gets the default value to use for a `loading` attribute on an element.
-
functionwp_omit_loading_attr_threshold()
Gets the threshold for how many of the first content media elements to not lazy-load.
-
Filters the threshold for how many of the first content media elements to not lazy-load.
-
Increases an internal content media count variable.
-
functionwp_readonly()
Outputs the HTML readonly attribute.
-
Gets the REST API route for a post type.
-
Filters the REST API route for a post type.
-
Gets the REST API route for a taxonomy.
-
Filters the REST API route for a taxonomy.
-
functionget_query_pagination_arrow()
Helper function that returns the proper pagination arrow HTML for `QueryPaginationNext` and `QueryPaginationPrevious` blocks based on the provided `paginationArrow` from `QueryPagination` context.
-
functionwp_enqueue_block_style()
Enqueues a stylesheet for a specific block.
-
function_wp_multiple_block_styles()
Allows multiple block styles.
-
functionget_block_metadata_i18n_schema()
Gets i18n schema for block’s metadata read from `block.json` file.