mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Docs: All sorts of improvements and corrections to function and hook docs.
See #57840 git-svn-id: https://develop.svn.wordpress.org/trunk@55694 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -299,7 +299,7 @@ function _get_block_template_file( $template_type, $slug ) {
|
||||
*
|
||||
* @type array $slug__in List of slugs to include.
|
||||
* @type array $slug__not_in List of slugs to skip.
|
||||
* @type string $area A 'wp_template_part_area' taxonomy value to filter by (for wp_template_part template type only).
|
||||
* @type string $area A 'wp_template_part_area' taxonomy value to filter by (for 'wp_template_part' template type only).
|
||||
* @type string $post_type Post type to get the templates for.
|
||||
* }
|
||||
*
|
||||
@@ -755,7 +755,7 @@ function _wp_build_title_and_description_for_taxonomy_block_template( $taxonomy,
|
||||
* @access private
|
||||
*
|
||||
* @param WP_Post $post Template post.
|
||||
* @return WP_Block_Template|WP_Error Template.
|
||||
* @return WP_Block_Template|WP_Error Template or error object.
|
||||
*/
|
||||
function _build_block_template_result_from_post( $post ) {
|
||||
$default_template_types = get_default_block_template_types();
|
||||
@@ -1055,9 +1055,9 @@ function get_block_templates( $query = array(), $template_type = 'wp_template' )
|
||||
*
|
||||
* @since 5.8.0
|
||||
*
|
||||
* @param string $id Template unique identifier (example: theme_slug//template_slug).
|
||||
* @param string $template_type Optional. Template type: `'wp_template'` or '`wp_template_part'`.
|
||||
* Default `'wp_template'`.
|
||||
* @param string $id Template unique identifier (example: 'theme_slug//template_slug').
|
||||
* @param string $template_type Optional. Template type: 'wp_template' or 'wp_template_part'.
|
||||
* Default 'wp_template'.
|
||||
* @return WP_Block_Template|null Template.
|
||||
*/
|
||||
function get_block_template( $id, $template_type = 'wp_template' ) {
|
||||
@@ -1070,8 +1070,8 @@ function get_block_template( $id, $template_type = 'wp_template' ) {
|
||||
*
|
||||
* @param WP_Block_Template|null $block_template Return block template object to short-circuit the default query,
|
||||
* or null to allow WP to run its normal queries.
|
||||
* @param string $id Template unique identifier (example: theme_slug//template_slug).
|
||||
* @param string $template_type Template type: `'wp_template'` or '`wp_template_part'`.
|
||||
* @param string $id Template unique identifier (example: 'theme_slug//template_slug').
|
||||
* @param string $template_type Template type: 'wp_template' or 'wp_template_part'.
|
||||
*/
|
||||
$block_template = apply_filters( 'pre_get_block_template', null, $id, $template_type );
|
||||
if ( ! is_null( $block_template ) ) {
|
||||
@@ -1116,8 +1116,8 @@ function get_block_template( $id, $template_type = 'wp_template' ) {
|
||||
* @since 5.9.0
|
||||
*
|
||||
* @param WP_Block_Template|null $block_template The found block template, or null if there isn't one.
|
||||
* @param string $id Template unique identifier (example: theme_slug//template_slug).
|
||||
* @param array $template_type Template type: `'wp_template'` or '`wp_template_part'`.
|
||||
* @param string $id Template unique identifier (example: 'theme_slug//template_slug').
|
||||
* @param array $template_type Template type: 'wp_template' or 'wp_template_part'.
|
||||
*/
|
||||
return apply_filters( 'get_block_template', $block_template, $id, $template_type );
|
||||
}
|
||||
@@ -1129,9 +1129,9 @@ function get_block_template( $id, $template_type = 'wp_template' ) {
|
||||
*
|
||||
* @since 5.9.0
|
||||
*
|
||||
* @param string $id Template unique identifier (example: theme_slug//template_slug).
|
||||
* @param string $template_type Optional. Template type: `'wp_template'` or '`wp_template_part'`.
|
||||
* Default `'wp_template'`.
|
||||
* @param string $id Template unique identifier (example: 'theme_slug//template_slug').
|
||||
* @param string $template_type Optional. Template type: 'wp_template' or 'wp_template_part'.
|
||||
* Default 'wp_template'.
|
||||
* @return WP_Block_Template|null The found block template, or null if there isn't one.
|
||||
*/
|
||||
function get_block_file_template( $id, $template_type = 'wp_template' ) {
|
||||
@@ -1144,8 +1144,8 @@ function get_block_file_template( $id, $template_type = 'wp_template' ) {
|
||||
*
|
||||
* @param WP_Block_Template|null $block_template Return block template object to short-circuit the default query,
|
||||
* or null to allow WP to run its normal queries.
|
||||
* @param string $id Template unique identifier (example: theme_slug//template_slug).
|
||||
* @param string $template_type Template type: `'wp_template'` or '`wp_template_part'`.
|
||||
* @param string $id Template unique identifier (example: 'theme_slug//template_slug').
|
||||
* @param string $template_type Template type: 'wp_template' or 'wp_template_part'.
|
||||
*/
|
||||
$block_template = apply_filters( 'pre_get_block_file_template', null, $id, $template_type );
|
||||
if ( ! is_null( $block_template ) ) {
|
||||
@@ -1178,8 +1178,8 @@ function get_block_file_template( $id, $template_type = 'wp_template' ) {
|
||||
* @since 5.9.0
|
||||
*
|
||||
* @param WP_Block_Template|null $block_template The found block template, or null if there is none.
|
||||
* @param string $id Template unique identifier (example: theme_slug//template_slug).
|
||||
* @param string $template_type Template type: `'wp_template'` or '`wp_template_part'`.
|
||||
* @param string $id Template unique identifier (example: 'theme_slug//template_slug').
|
||||
* @param string $template_type Template type: 'wp_template' or 'wp_template_part'.
|
||||
*/
|
||||
return apply_filters( 'get_block_file_template', $block_template, $id, $template_type );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user