[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/ -> block-template-utils.php (summary)

Utilities used to fetch and create templates.

File Size: 142 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 3 functions

  _build_template_result_from_post()
  get_block_templates()
  get_block_template()

Functions
Functions that are not part of a class:

_build_template_result_from_post( $post )   X-Ref
Build a unified template object based a post Object.

param: WP_Post $post Template post.
return: WP_Block_Template|WP_Error Template.

get_block_templates( $query = array()   X-Ref
Retrieves a list of unified template objects based on a query.

param: array $query {
param: string $template_type Optional. The template type (post type). Default 'wp_template'.
return: WP_Block_Template[] Block template objects.

get_block_template( $id, $template_type = 'wp_template' )   X-Ref
Retrieves a single unified template object using its id.

param: string $id            Template unique identifier (example: theme_slug//template_slug).
param: string $template_type Optional. The template type (post type). Default 'wp_template'.
return: WP_Block_Template|null Template.



Generated : Sat Jul 24 08:20:02 2021 Cross-referenced by PHPXref