Check correct cap in WP_Terms_List_Table::check_permissions. Props duck_. Fixes #15673
git-svn-id: https://develop.svn.wordpress.org/trunk@16713 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b4ff753679
commit
a01db8b692
@ -32,12 +32,11 @@ class WP_Terms_List_Table extends WP_List_Table {
|
||||
) );
|
||||
}
|
||||
|
||||
function check_permissions( $type = 'manage' ) {
|
||||
function check_permissions( $type = '' ) {
|
||||
global $tax;
|
||||
|
||||
$cap = 'manage' == $type ? $tax->cap->manage_terms : $tax->cap->edit_terms;
|
||||
|
||||
if ( !current_user_can( $tax->cap->manage_terms ) )
|
||||
$cap = 'edit' == $type ? $tax->cap->edit_terms : $tax->cap->manage_terms;
|
||||
if ( !current_user_can( $cap ) )
|
||||
wp_die( __( 'Cheatin’ uh?' ) );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user