Make WordPress Core

Ticket #38958: 38958.diff

File 38958.diff, 706 bytes (added by johnbillion, 9 years ago)
  • src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php

     
    349349                }
    350350
    351351                $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 ) ) {
    353353                        return new WP_Error( 'rest_cannot_create', __( 'Sorry, you are not allowed to create new terms.' ), array( 'status' => rest_authorization_required_code() ) );
    354354                }
    355355