Skip to content

Commit

Permalink
REST API: Fix check for has_archive inclusion.
Browse files Browse the repository at this point in the history
Props dlh, audrasjb, mukesh27.
Fixes #56618.

git-svn-id: https://develop.svn.wordpress.org/trunk@54288 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
jorgefilipecosta committed Sep 22, 2022
1 parent 2f1cd87 commit ac8ccca
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public function prepare_item_for_response( $item, $request ) {
$data['hierarchical'] = $post_type->hierarchical;
}

if ( rest_is_field_included( 'hierarchical', $fields ) ) {
if ( rest_is_field_included( 'has_archive', $fields ) ) {
$data['has_archive'] = $post_type->has_archive;
}

Expand Down

0 comments on commit ac8ccca

Please sign in to comment.