mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Move taxonomy object properties for capabilities into a cap object. Capabilities can be specified via ['capabilities'] (an array keyed by the generic cap name) for register_taxonomy. fixes #13358.
git-svn-id: https://develop.svn.wordpress.org/trunk@14593 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -646,7 +646,7 @@ function get_tag_feed_link($tag_id, $feed = '') {
|
||||
function get_edit_tag_link( $tag_id = 0, $taxonomy = 'post_tag' ) {
|
||||
global $post_type;
|
||||
$tax = get_taxonomy($taxonomy);
|
||||
if ( !current_user_can($tax->edit_cap) )
|
||||
if ( !current_user_can($tax->cap->edit_terms) )
|
||||
return;
|
||||
|
||||
$tag = get_term($tag_id, $taxonomy);
|
||||
@@ -668,7 +668,7 @@ function get_edit_tag_link( $tag_id = 0, $taxonomy = 'post_tag' ) {
|
||||
*/
|
||||
function edit_tag_link( $link = '', $before = '', $after = '', $tag = null ) {
|
||||
$tax = get_taxonomy('post_tag');
|
||||
if ( !current_user_can($tax->edit_cap) )
|
||||
if ( !current_user_can($tax->cap->edit_terms) )
|
||||
return;
|
||||
|
||||
$tag = get_term($tag, 'post_tag');
|
||||
|
||||
Reference in New Issue
Block a user