REST API: Improve a few more strings added after the 4.7 string freeze.

See #39178.

See also #40720 for potential follow-up steps.

Built from https://develop.svn.wordpress.org/trunk@40606


git-svn-id: http://core.svn.wordpress.org/trunk@40476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
James Nylen 2017-05-10 19:41:41 +00:00
parent 7d337c1327
commit 802c923873
5 changed files with 7 additions and 7 deletions

View File

@ -76,7 +76,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
'args' => array(
'context' => $this->get_context_param( array( 'default' => 'view' ) ),
'password' => array(
'description' => __( 'The password for the post if it is password protected.' ),
'description' => __( 'The password for the parent post of the comment (if the post is password protected).' ),
'type' => 'string',
),
),
@ -98,7 +98,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
'description' => __( 'Whether to bypass trash and force deletion.' ),
),
'password' => array(
'description' => __( 'The password for the post if it is password protected.' ),
'description' => __( 'The password for the parent post of the comment (if the post is password protected).' ),
'type' => 'string',
),
),

View File

@ -2150,7 +2150,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
if ( $post_type->hierarchical || 'attachment' === $this->post_type ) {
$query_params['parent'] = array(
'description' => __( 'Limit result set to those of particular parent IDs.' ),
'description' => __( 'Limit result set to items with particular parent IDs.' ),
'type' => 'array',
'items' => array(
'type' => 'integer',

View File

@ -11,7 +11,7 @@
* Core class used to access revisions via the REST API.
*
* @since 4.7.0
*0
*
* @see WP_REST_Controller
*/
class WP_REST_Revisions_Controller extends WP_REST_Controller {

View File

@ -396,7 +396,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
public function create_item( $request ) {
if ( isset( $request['parent'] ) ) {
if ( ! is_taxonomy_hierarchical( $this->taxonomy ) ) {
return new WP_Error( 'rest_taxonomy_not_hierarchical', __( 'Can not set parent term, taxonomy is not hierarchical.' ), array( 'status' => 400 ) );
return new WP_Error( 'rest_taxonomy_not_hierarchical', __( 'Cannot set parent term, taxonomy is not hierarchical.' ), array( 'status' => 400 ) );
}
$parent = get_term( (int) $request['parent'], $this->taxonomy );
@ -502,7 +502,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
if ( isset( $request['parent'] ) ) {
if ( ! is_taxonomy_hierarchical( $this->taxonomy ) ) {
return new WP_Error( 'rest_taxonomy_not_hierarchical', __( 'Can not set parent term, taxonomy is not hierarchical.' ), array( 'status' => 400 ) );
return new WP_Error( 'rest_taxonomy_not_hierarchical', __( 'Cannot set parent term, taxonomy is not hierarchical.' ), array( 'status' => 400 ) );
}
$parent = get_term( (int) $request['parent'], $this->taxonomy );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-40605';
$wp_version = '4.8-alpha-40606';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.