From a01db8b6921f7bad1186b1256ba4cd00a4ef83f9 Mon Sep 17 00:00:00 2001 From: scribu Date: Fri, 3 Dec 2010 23:18:02 +0000 Subject: [PATCH] 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 --- wp-admin/includes/class-wp-terms-list-table.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/class-wp-terms-list-table.php b/wp-admin/includes/class-wp-terms-list-table.php index 76d094be2b..9f0d3e8f1d 100644 --- a/wp-admin/includes/class-wp-terms-list-table.php +++ b/wp-admin/includes/class-wp-terms-list-table.php @@ -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?' ) ); }