Add cap check. Props duck_. see #14343
git-svn-id: https://develop.svn.wordpress.org/trunk@15439 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
02580f7b0b
commit
38563c2521
@ -19,6 +19,9 @@ if ( !taxonomy_exists($taxonomy) )
|
||||
|
||||
$tax = get_taxonomy($taxonomy);
|
||||
|
||||
if ( ! current_user_can($tax->cap->manage_terms) )
|
||||
wp_die(__('Cheatin’ uh?'));
|
||||
|
||||
$title = $tax->labels->name;
|
||||
|
||||
if ( empty($post_type) || !in_array( $post_type, get_post_types( array('public' => true) ) ) )
|
||||
|
Loading…
Reference in New Issue
Block a user