Ticket #35614: 35614.diff
File 35614.diff, 720 bytes (added by , 8 years ago) |
---|
-
src/wp-includes/capabilities.php
429 429 case 'assign_term': 430 430 $term_id = $args[0]; 431 431 $term = get_term( $term_id ); 432 if ( ! $term || is_wp_error( $term )) {432 if ( ! $term ) { 433 433 $caps[] = 'do_not_allow'; 434 434 break; 435 435 } 436 436 437 if ( is_wp_error( $term ) ) { 438 if ( 'ambiguous_term_id' === $term->get_error_code() ) { 439 _split_shared_term( $term_id, /* $tt_id */ ); 440 } 441 442 $caps[] = 'do_not_allow'; 443 break; 444 } 445 437 446 $tax = get_taxonomy( $term->taxonomy ); 438 447 if ( ! $tax ) { 439 448 $caps[] = 'do_not_allow';