Docs: Fix typos in various REST API DocBlocks and comments.

Follow-up to [34928], [43739], [46422], [50717], [51973], [54528].

Props antonvlasenko.
Fixes #61593.
Built from https://develop.svn.wordpress.org/trunk@58706


git-svn-id: http://core.svn.wordpress.org/trunk@58108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2024-07-11 06:24:17 +00:00
parent 70c9c49f9b
commit 99effa2d51
7 changed files with 15 additions and 15 deletions

View File

@ -165,7 +165,7 @@ class WP_REST_Request implements ArrayAccess {
* Canonicalizes the header name.
*
* Ensures that header names are always treated the same regardless of
* source. Header names are always case insensitive.
* source. Header names are always case-insensitive.
*
* Note that we treat `-` (dashes) and `_` (underscores) as the same
* character, as per header parsing rules in both Apache and nginx.

View File

@ -450,7 +450,7 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
}
/**
* Performs post processing on an attachment.
* Performs post-processing on an attachment.
*
* @since 5.3.0
*
@ -471,7 +471,7 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
}
/**
* Checks if a given request can perform post processing on an attachment.
* Checks if a given request can perform post-processing on an attachment.
*
* @since 5.3.0
*
@ -601,7 +601,7 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
$args = $modifier['args'];
switch ( $modifier['type'] ) {
case 'rotate':
// Rotation direction: clockwise vs. counter clockwise.
// Rotation direction: clockwise vs. counterclockwise.
$rotate = 0 - $args['angle'];
if ( 0 !== $rotate ) {
@ -661,7 +661,7 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
$filename = "{$image_name}.{$image_ext}";
// Create the uploads sub-directory if needed.
// Create the uploads subdirectory if needed.
$uploads = wp_upload_dir();
// Make the file name unique in the (new) upload directory.

View File

@ -183,7 +183,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
*
* @param bool $required Whether the post requires a password check.
* @param WP_Post $post The post been password checked.
* @return bool Result of password check taking in to account REST API considerations.
* @return bool Result of password check taking into account REST API considerations.
*/
public function check_password_required( $required, $post ) {
if ( ! $required ) {
@ -2051,7 +2051,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
*
* By default, WordPress will show password protected posts with a title of
* "Protected: %s", as the REST API communicates the protected status of a post
* in a machine readable format, we remove the "Protected: " prefix.
* in a machine-readable format, we remove the "Protected: " prefix.
*
* @since 4.7.0
*

View File

@ -164,7 +164,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
return true;
}
// Otherwise grant access if the post is readable by the logged in user.
// Otherwise grant access if the post is readable by the logged-in user.
if ( current_user_can( 'read_post', $post->ID ) ) {
return true;
}

View File

@ -347,7 +347,7 @@ class WP_REST_URL_Details_Controller extends WP_REST_Controller {
* @since 5.9.0
*
* @param array $meta_elements {
* A multi-dimensional indexed array on success, else empty array.
* A multidimensional indexed array on success, else empty array.
*
* @type string[] $0 Meta elements with a content attribute.
* @type string[] $1 Content attribute's opening quotation mark.
@ -383,7 +383,7 @@ class WP_REST_URL_Details_Controller extends WP_REST_Controller {
* @since 5.9.0
*
* @param array $meta_elements {
* A multi-dimensional indexed array on success, else empty array.
* A multidimensional indexed array on success, else empty array.
*
* @type string[] $0 Meta elements with a content attribute.
* @type string[] $1 Content attribute's opening quotation mark.
@ -525,7 +525,7 @@ class WP_REST_URL_Details_Controller extends WP_REST_Controller {
*
* @param string $html The string of HTML to be parsed.
* @return array {
* A multi-dimensional indexed array on success, else empty array.
* A multidimensional indexed array on success, else empty array.
*
* @type string[] $0 Meta elements with a content attribute.
* @type string[] $1 Content attribute's opening quotation mark.
@ -588,7 +588,7 @@ class WP_REST_URL_Details_Controller extends WP_REST_Controller {
/*
* These are the options:
* - i : case insensitive
* - i : case-insensitive
* - s : allows newline characters for the . match (needed for multiline elements)
* - U means non-greedy matching
*/
@ -637,7 +637,7 @@ class WP_REST_URL_Details_Controller extends WP_REST_Controller {
/*
* These are the options:
* - i : case insensitive
* - i : case-insensitive
* - s : allows newline characters for the . match (needed for multiline elements)
* - U means non-greedy matching
*/

View File

@ -187,7 +187,7 @@ class WP_REST_Post_Search_Handler extends WP_REST_Search_Handler {
*
* By default, WordPress will show password protected posts with a title of
* "Protected: %s". As the REST API communicates the protected status of a post
* in a machine readable format, we remove the "Protected: " prefix.
* in a machine-readable format, we remove the "Protected: " prefix.
*
* @since 5.0.0
*

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.7-alpha-58705';
$wp_version = '6.7-alpha-58706';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.