Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for FSE backport in core #36201

Merged
merged 20 commits into from
Nov 5, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix get_block_templates
ntsekouras committed Nov 4, 2021
commit ce829f517d70125d7c025ac8e028beaf2f4f5717
31 changes: 15 additions & 16 deletions lib/compat/wordpress-5.9/block-template-utils.php
Original file line number Diff line number Diff line change
@@ -640,23 +640,22 @@ function get_block_templates( $query = array(), $template_type = 'wp_template' )
}
}
}
/**
* Filters the array of queried block templates array after they've been fetched.
*
* @since 10.8
*
* @param WP_Block_Template[] $query_result Array of found block templates.
* @param array $query {
* Optional. Arguments to retrieve templates.
*
* @type array $slug__in List of slugs to include.
* @type int $wp_id Post ID of customized template.
* }
* @param array $template_type wp_template or wp_template_part.
*/
return apply_filters( 'get_block_templates', $query_result, $query, $template_type );
}

/**
* Filters the array of queried block templates array after they've been fetched.
*
* @since 10.8
*
* @param WP_Block_Template[] $query_result Array of found block templates.
* @param array $query {
* Optional. Arguments to retrieve templates.
*
* @type array $slug__in List of slugs to include.
* @type int $wp_id Post ID of customized template.
* }
* @param array $template_type wp_template or wp_template_part.
*/
return apply_filters( 'get_block_templates', $query_result, $query, $template_type );
}

if ( ! function_exists( 'get_block_template' ) ) {