Ticket #38808: 38808-assign-terms.patch
File 38808-assign-terms.patch, 1.8 KB (added by , 8 years ago) |
---|
-
wp-includes/class-wp-xmlrpc-server.php
2142 2142 return new IXR_Error( 404, __( 'Invalid term ID.' ) ); 2143 2143 2144 2144 if ( ! current_user_can( 'assign_term', $term_id ) ) { 2145 return new IXR_Error( 401, __( 'Sorry, you are not allowed to assign t his term.' ) );2145 return new IXR_Error( 401, __( 'Sorry, you are not allowed to assign terms.' ) ); 2146 2146 } 2147 2147 2148 2148 return $this->_prepare_term( $term ); -
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
462 462 } 463 463 464 464 if ( ! $this->check_assign_terms_permission( $request ) ) { 465 return new WP_Error( 'rest_cannot_assign_term', __( 'Sorry, you are not allowed to assign t he provided terms.' ), array( 'status' => rest_authorization_required_code() ) );465 return new WP_Error( 'rest_cannot_assign_term', __( 'Sorry, you are not allowed to assign terms.' ), array( 'status' => rest_authorization_required_code() ) ); 466 466 } 467 467 468 468 return true; … … 599 599 } 600 600 601 601 if ( ! $this->check_assign_terms_permission( $request ) ) { 602 return new WP_Error( 'rest_cannot_assign_term', __( 'Sorry, you are not allowed to assign t he provided terms.' ), array( 'status' => rest_authorization_required_code() ) );602 return new WP_Error( 'rest_cannot_assign_term', __( 'Sorry, you are not allowed to assign terms.' ), array( 'status' => rest_authorization_required_code() ) ); 603 603 } 604 604 605 605 return true;