- Timestamp:
- 07/13/2018 04:23:35 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php
r43087 r43440 381 381 382 382 $taxonomy_obj = get_taxonomy( $this->taxonomy ); 383 if ( ! current_user_can( $taxonomy_obj->cap->edit_terms ) ) { 383 if ( ( is_taxonomy_hierarchical( $this->taxonomy ) 384 && ! current_user_can( $taxonomy_obj->cap->edit_terms ) ) 385 || ( ! is_taxonomy_hierarchical( $this->taxonomy ) 386 && ! current_user_can( $taxonomy_obj->cap->assign_terms ) ) ) { 384 387 return new WP_Error( 'rest_cannot_create', __( 'Sorry, you are not allowed to create new terms.' ), array( 'status' => rest_authorization_required_code() ) ); 385 388 }
Note: See TracChangeset
for help on using the changeset viewer.