Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c1c5111
Templates: allow templates to be activated and deactivated
ellatrix Dec 30, 2024
1c55ea9
Migrate to active templates
ellatrix Dec 30, 2024
07fcf91
Use Badge component, add rename
ellatrix Dec 30, 2024
75f8056
Fix click handler
ellatrix Dec 30, 2024
e35f93c
Fix some e2e tests
ellatrix Dec 30, 2024
af44163
Fix preload check
ellatrix Dec 30, 2024
64873fa
All theme templates are active by default
ellatrix Dec 30, 2024
adc86c7
Add backport log entry
ellatrix Dec 30, 2024
0d3d192
Fix perf test
ellatrix Dec 31, 2024
bce1d83
Prevent active_templates from being empty
ellatrix Jul 29, 2025
a3e799b
Fix setting type
ellatrix Sep 4, 2025
4a569e4
Add templates php filter so Woo templates show up
ellatrix Sep 5, 2025
b849489
Make sure static template filtering in dataview is active
ellatrix Sep 5, 2025
cf33029
Include plugin templates in active tab
ellatrix Sep 14, 2025
d9d4c16
Move to 6.9 folder
ellatrix Sep 14, 2025
f1941b3
Make sure hook adding terms runs before default hooks
ellatrix Sep 14, 2025
e8beeea
Prevent get_block_templates from returning user templates (needed to …
ellatrix Sep 15, 2025
daa1412
Revert "Prevent get_block_templates from returning user templates (ne…
ellatrix Sep 15, 2025
fa55d1e
Fix preload
ellatrix Sep 15, 2025
fa8761d
php lint
ellatrix Sep 15, 2025
435b22c
Remove __returnsBadge
ellatrix Sep 15, 2025
5d7e2a9
Remove dataviews changes
ellatrix Sep 15, 2025
31041bb
Adjust test selector
ellatrix Sep 16, 2025
c4e30f4
Fix preload
ellatrix Sep 16, 2025
487c124
Ensure the edited post id is a string
ellatrix Sep 16, 2025
efa4291
Fix preload e2e test
ellatrix Sep 16, 2025
f03a90d
_wp_static_template => wp_registered_template
ellatrix Sep 17, 2025
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
Add templates php filter so Woo templates show up
  • Loading branch information
ellatrix committed Sep 14, 2025
commit 4a569e4d90b2002300b8f728abe3ef934e1b53ec
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,24 @@ function ( $registered_template ) use ( $template_files ) {

$query_result = array_merge( $query_result, $matching_registered_templates );

/**
* Filters the array of queried block templates array after they've been fetched.
*
* @since 5.9.0
*
* @param WP_Block_Template[] $query_result Array of found block templates.
* @param array $query {
* Arguments to retrieve templates. All arguments are optional.
*
* @type string[] $slug__in List of slugs to include.
* @type int $wp_id Post ID of customized template.
* @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.
* }
* @param string $template_type wp_template or wp_template_part.
*/
$query_result = apply_filters( 'get_block_templates', $query_result, $query, 'wp_template' );

$templates = array();
foreach ( $query_result as $template ) {
$item = $this->prepare_item_for_response( $template, $request );
Expand Down