Ticket #38958: 38958.diff
| File 38958.diff, 706 bytes (added by , 9 years ago) |
|---|
-
src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php
349 349 } 350 350 351 351 $taxonomy_obj = get_taxonomy( $this->taxonomy ); 352 if ( ! current_user_can( $taxonomy_obj->cap-> manage_terms ) ) {352 if ( ! current_user_can( $taxonomy_obj->cap->edit_terms ) ) { 353 353 return new WP_Error( 'rest_cannot_create', __( 'Sorry, you are not allowed to create new terms.' ), array( 'status' => rest_authorization_required_code() ) ); 354 354 } 355 355