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:
parent
70c9c49f9b
commit
99effa2d51
|
@ -165,7 +165,7 @@ class WP_REST_Request implements ArrayAccess {
|
||||||
* Canonicalizes the header name.
|
* Canonicalizes the header name.
|
||||||
*
|
*
|
||||||
* Ensures that header names are always treated the same regardless of
|
* 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
|
* Note that we treat `-` (dashes) and `_` (underscores) as the same
|
||||||
* character, as per header parsing rules in both Apache and nginx.
|
* character, as per header parsing rules in both Apache and nginx.
|
||||||
|
|
|
@ -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
|
* @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
|
* @since 5.3.0
|
||||||
*
|
*
|
||||||
|
@ -601,7 +601,7 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
|
||||||
$args = $modifier['args'];
|
$args = $modifier['args'];
|
||||||
switch ( $modifier['type'] ) {
|
switch ( $modifier['type'] ) {
|
||||||
case 'rotate':
|
case 'rotate':
|
||||||
// Rotation direction: clockwise vs. counter clockwise.
|
// Rotation direction: clockwise vs. counterclockwise.
|
||||||
$rotate = 0 - $args['angle'];
|
$rotate = 0 - $args['angle'];
|
||||||
|
|
||||||
if ( 0 !== $rotate ) {
|
if ( 0 !== $rotate ) {
|
||||||
|
@ -661,7 +661,7 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
|
||||||
|
|
||||||
$filename = "{$image_name}.{$image_ext}";
|
$filename = "{$image_name}.{$image_ext}";
|
||||||
|
|
||||||
// Create the uploads sub-directory if needed.
|
// Create the uploads subdirectory if needed.
|
||||||
$uploads = wp_upload_dir();
|
$uploads = wp_upload_dir();
|
||||||
|
|
||||||
// Make the file name unique in the (new) upload directory.
|
// Make the file name unique in the (new) upload directory.
|
||||||
|
|
|
@ -183,7 +183,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||||
*
|
*
|
||||||
* @param bool $required Whether the post requires a password check.
|
* @param bool $required Whether the post requires a password check.
|
||||||
* @param WP_Post $post The post been password checked.
|
* @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 ) {
|
public function check_password_required( $required, $post ) {
|
||||||
if ( ! $required ) {
|
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
|
* 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
|
* "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
|
* @since 4.7.0
|
||||||
*
|
*
|
||||||
|
|
|
@ -164,7 +164,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
|
||||||
return true;
|
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 ) ) {
|
if ( current_user_can( 'read_post', $post->ID ) ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -347,7 +347,7 @@ class WP_REST_URL_Details_Controller extends WP_REST_Controller {
|
||||||
* @since 5.9.0
|
* @since 5.9.0
|
||||||
*
|
*
|
||||||
* @param array $meta_elements {
|
* @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[] $0 Meta elements with a content attribute.
|
||||||
* @type string[] $1 Content attribute's opening quotation mark.
|
* @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
|
* @since 5.9.0
|
||||||
*
|
*
|
||||||
* @param array $meta_elements {
|
* @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[] $0 Meta elements with a content attribute.
|
||||||
* @type string[] $1 Content attribute's opening quotation mark.
|
* @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.
|
* @param string $html The string of HTML to be parsed.
|
||||||
* @return array {
|
* @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[] $0 Meta elements with a content attribute.
|
||||||
* @type string[] $1 Content attribute's opening quotation mark.
|
* @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:
|
* These are the options:
|
||||||
* - i : case insensitive
|
* - i : case-insensitive
|
||||||
* - s : allows newline characters for the . match (needed for multiline elements)
|
* - s : allows newline characters for the . match (needed for multiline elements)
|
||||||
* - U means non-greedy matching
|
* - U means non-greedy matching
|
||||||
*/
|
*/
|
||||||
|
@ -637,7 +637,7 @@ class WP_REST_URL_Details_Controller extends WP_REST_Controller {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These are the options:
|
* These are the options:
|
||||||
* - i : case insensitive
|
* - i : case-insensitive
|
||||||
* - s : allows newline characters for the . match (needed for multiline elements)
|
* - s : allows newline characters for the . match (needed for multiline elements)
|
||||||
* - U means non-greedy matching
|
* - U means non-greedy matching
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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
|
* 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
|
* "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
|
* @since 5.0.0
|
||||||
*
|
*
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue