From 411f8247093998cc6b651db3f63f948982c9e492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 17 Jul 2024 22:22:02 +0200 Subject: [PATCH 1/2] Fix a typo in InsertPostHandler --- inc/class-insert-post-handler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/class-insert-post-handler.php b/inc/class-insert-post-handler.php index 0399660..59d9fa9 100644 --- a/inc/class-insert-post-handler.php +++ b/inc/class-insert-post-handler.php @@ -66,7 +66,7 @@ function action_wp_insert_post( int $post_ID, WP_Post $post, bool $update ) : vo $authors = $unsanitized_postarr[ POSTS_PARAM ]; } else { /** - * Set the default authorship author. Defaults to the orignal post author. + * Set the default authorship author. Defaults to the original post author. * * @param array $authors Authors to add to a post on insert if none have been passed. Default to post author. * @param WP_Post $post Post object. From 24f698161a790ba0132d983e1d9aba0438ff7843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 17 Jul 2024 22:23:00 +0200 Subject: [PATCH 2/2] Fix a typo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b0d6a20..70e4054 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ This endpoint allows: ### `authorship` field -This field is added to the endpoint for all suported post types (by default, ones which that have post type support for `author`), for example `wp/v2/posts`. This field is readable and writable and accepts and provides an array of IDs of users attributed to the post. +This field is added to the endpoint for all supported post types (by default, ones which that have post type support for `author`), for example `wp/v2/posts`. This field is readable and writable and accepts and provides an array of IDs of users attributed to the post. In addition, user objects are embedded in the `_embedded['wp:authorship']` field in the response if `_embed` is set and the authenticated user can list users.