REST API: Fix check for has_archive inclusion.

Props dlh, audrasjb, mukesh27.
Fixes #56618.
Built from https://develop.svn.wordpress.org/trunk@54288


git-svn-id: http://core.svn.wordpress.org/trunk@53847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
jorgefilipecosta 2022-09-22 11:33:13 +00:00
parent 574cedca42
commit d8525e93c0
2 changed files with 2 additions and 2 deletions

View File

@ -198,7 +198,7 @@ class WP_REST_Post_Types_Controller extends WP_REST_Controller {
$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;
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-beta1-54287';
$wp_version = '6.1-beta1-54288';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.