Definition:
function get_tag_link( $tag ) {}
Retrieve the link to the tag.
Parameters
- int|object $tag: Tag ID or object.
Return values
returns:Link on success, empty string if tag does not exist.
Source code
function get_tag_link( $tag ) { if ( ! is_object( $tag ) ) $tag = (int) $tag; $tag = get_term_link( $tag, 'post_tag' ); if ( is_wp_error( $tag ) ) return ''; return $tag; }
1725
No comments yet... Be the first to leave a reply!