mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
Add cap check. Props duck_. see #14343
git-svn-id: http://svn.automattic.com/wordpress/trunk@15439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d59d54b09d
commit
59b28172be
@ -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