Merged in feature/81-dev-dev01 (pull request #5)

auto-patch  81-dev-dev01-2023-12-05T22_45_26

* auto-patch  81-dev-dev01-2023-12-05T22_45_26
This commit is contained in:
Tony Volpe
2023-12-05 23:05:59 +00:00
parent ba16964e7a
commit 725d3043d5
1463 changed files with 142461 additions and 89421 deletions

View File

@@ -241,17 +241,23 @@ function create_initial_rest_routes() {
continue;
}
$controller->register_routes();
if ( ! $post_type->late_route_registration ) {
$controller->register_routes();
}
if ( post_type_supports( $post_type->name, 'revisions' ) ) {
$revisions_controller = new WP_REST_Revisions_Controller( $post_type->name );
$revisions_controller = $post_type->get_revisions_rest_controller();
if ( $revisions_controller ) {
$revisions_controller->register_routes();
}
if ( 'attachment' !== $post_type->name ) {
$autosaves_controller = new WP_REST_Autosaves_Controller( $post_type->name );
$autosaves_controller = $post_type->get_autosave_rest_controller();
if ( $autosaves_controller ) {
$autosaves_controller->register_routes();
}
if ( $post_type->late_route_registration ) {
$controller->register_routes();
}
}
// Post types.
@@ -1084,6 +1090,7 @@ function rest_cookie_check_errors( $result ) {
$result = wp_verify_nonce( $nonce, 'wp_rest' );
if ( ! $result ) {
add_filter( 'rest_send_nocache_headers', '__return_true', 20 );
return new WP_Error( 'rest_cookie_invalid_nonce', __( 'Cookie check failed' ), array( 'status' => 403 ) );
}
@@ -1215,13 +1222,13 @@ function rest_add_application_passwords_to_index( $response ) {
}
/**
* Retrieves the avatar urls in various sizes.
* Retrieves the avatar URLs in various sizes.
*
* @since 4.7.0
*
* @see get_avatar_url()
*
* @param mixed $id_or_email The Gravatar to retrieve a URL for. Accepts a user_id, gravatar md5 hash,
* @param mixed $id_or_email The avatar to retrieve a URL for. Accepts a user ID, Gravatar MD5 hash,
* user email, WP_User object, WP_Post object, or WP_Comment object.
* @return (string|false)[] Avatar URLs keyed by size. Each value can be a URL string or boolean false.
*/