[wp-trac] [WordPress Trac] #32786: In get_edit_term_link: $term validation
WordPress Trac
noreply at wordpress.org
Fri Jun 26 04:51:26 UTC 2015
#32786: In get_edit_term_link: $term validation
-------------------------+------------------------------
Reporter: tmatsuur | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 4.2.2
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------+------------------------------
Comment (by tmatsuur):
When a consistency with source cord of the other functions is considered,
isn't the next source cord appropriate?
(See: get_term_feed_link)
{{{
if ( empty( $term ) || is_wp_error( $term ) )
return false;
}}}
And, can't get_term be called first?
{{{
$term = get_term( $term_id, $taxonomy );
if ( empty( $term ) || is_wp_error( $term ) )
return false;
$tax = get_taxonomy( $taxonomy );
if ( !current_user_can( $tax->cap->edit_terms ) )
return;
}}}
I'm sorry, but I don't understand how to use the `diff`.
I hope that my intention is transmitted correctly.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32786#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list