Definition:
function get_edit_term_link( $term_id, $taxonomy, $object_type = '' ) {}
Retrieve edit term url.
Parameters
- int $term_id: Term ID
- string $taxonomy: Taxonomy
- string $object_type: The object type
Defined filters
- get_edit_term_link
apply_filters( 'get_edit_term_link', $location, $term_id, $taxonomy, $object_type )
Source code
function get_edit_term_link( $term_id, $taxonomy, $object_type = '' ) { $tax = get_taxonomy( $taxonomy ); if ( !current_user_can( $tax->cap->edit_terms ) ) return; $term = get_term( $term_id, $taxonomy ); $args = array( 'action' => 'edit', 'taxonomy' => $taxonomy, 'tag_ID' => $term->term_id, ); if ( $object_type ) $args['post_type'] = $object_type; $location = add_query_arg( $args, admin_url( 'edit-tags.php' ) ); return apply_filters( 'get_edit_term_link', $location, $term_id, $taxonomy, $object_type ); }
9476
No comments yet... Be the first to leave a reply!