Skip to content

Commit

Permalink
Fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed May 13, 2020
1 parent ace511a commit 326d349
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function filter_rest_wp_template_collection_params( $query_params ) {
function filter_rest_wp_template_query( $args, $request ) {
if ( $request['resolved'] ) {
$template_ids = array( 0 ); // Return nothing by default (the 0 is needed for `post__in`).
$template_types = $request['slug'] ? array( $request['slug'] ) : get_template_types();
$template_types = $request['slug'] ? $request['slug'] : get_template_types();

foreach ( $template_types as $template_type ) {
// Skip 'embed' for now because it is not a regular template type.
Expand Down

0 comments on commit 326d349

Please sign in to comment.