}
$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?' ) );
$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(
'<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' .
- '<p>' . __( 'You are not allowed to manage this item.' ) . '</p>',
+ '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
403
);
}