REST API: Improve a few more strings added after the 4.7 string freeze.
See #39178. See also #40720 for potential follow-up steps. git-svn-id: https://develop.svn.wordpress.org/trunk@40606 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0fab6c9fdc
commit
8712f5dcb4
@ -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',
|
||||
),
|
||||
),
|
||||
|
@ -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',
|
||||
|
@ -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 {
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user