Changeset 43443 for branches/4.9/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php
- Timestamp:
- 07/13/2018 06:28:29 AM (8 years ago)
- Location:
- branches/4.9
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
-
branches/4.9/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php
r42578 r43443 377 377 378 378 $taxonomy_obj = get_taxonomy( $this->taxonomy ); 379 if ( ! current_user_can( $taxonomy_obj->cap->edit_terms ) ) { 379 if ( ( is_taxonomy_hierarchical( $this->taxonomy ) 380 && ! current_user_can( $taxonomy_obj->cap->edit_terms ) ) 381 || ( ! is_taxonomy_hierarchical( $this->taxonomy ) 382 && ! current_user_can( $taxonomy_obj->cap->assign_terms ) ) ) { 380 383 return new WP_Error( 'rest_cannot_create', __( 'Sorry, you are not allowed to create new terms.' ), array( 'status' => rest_authorization_required_code() ) ); 381 384 }
Note: See TracChangeset
for help on using the changeset viewer.