Skip to content

Commit

Permalink
phpcbf
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Jun 5, 2020
1 parent e2a49b8 commit c4d0ca3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/template-parts.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function filter_rest_wp_template_part_collection_params( $query_params ) {
'description' => __( 'Whether to filter for resolved template parts.', 'gutenberg' ),
'type' => 'boolean',
),
'template' => array(
'template' => array(
'description' => __( 'The template slug for the template that the template part is used by.', 'gutenberg' ),
'type' => 'string',
),
Expand All @@ -175,7 +175,7 @@ function filter_rest_wp_template_part_collection_params( $query_params ) {
function filter_rest_wp_template_part_query( $args, $request ) {
if ( $request['resolved'] ) {
$template_part_ids = array( 0 ); // Return nothing by default (the 0 is needed for `post__in`).
$template_types = $request['template'] ? array( $request['template'] ) : get_template_types();
$template_types = $request['template'] ? array( $request['template'] ) : 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 c4d0ca3

Please sign in to comment.