X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/784f914b1e4b1c62d6657e86397c2e83bcee4295..16e7b37c7914d753890c1a05a9335f3b43751eb8:/wp-admin/term.php diff --git a/wp-admin/term.php b/wp-admin/term.php index d5417321..2018ac04 100644 --- a/wp-admin/term.php +++ b/wp-admin/term.php @@ -20,7 +20,7 @@ if ( empty( $_REQUEST['tag_ID'] ) ) { } $tag_ID = absint( $_REQUEST['tag_ID'] ); -$tag = get_term( $tag_ID, '', OBJECT, 'edit' ); +$tag = get_term( $tag_ID, $taxnow, OBJECT, 'edit' ); if ( ! $tag instanceof WP_Term ) { wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) ); @@ -31,11 +31,11 @@ $taxonomy = $tax->name; $title = $tax->labels->edit_item; if ( ! in_array( $taxonomy, get_taxonomies( array( 'show_ui' => true ) ) ) || - ! current_user_can( $tax->cap->manage_terms ) + ! current_user_can( 'edit_term', $tag->term_id ) ) { wp_die( '

' . __( 'Cheatin’ uh?' ) . '

' . - '

' . __( 'You are not allowed to manage this item.' ) . '

', + '

' . __( 'Sorry, you are not allowed to edit this item.' ) . '

', 403 ); }