wpseek.com
A WordPress-centric search engine for devs and theme authors
get_the_author_link › WordPress Function
Since3.0.0
Deprecatedn/a
› get_the_author_link ( No parameters )
Returns: |
|
Defined at: |
|
Codex: |
Retrieve either author's link or author's name.
If the author has a home page set, return an HTML link, otherwise just return the author's name.Related Functions: get_the_author_login, get_the_author_id, the_author_link, get_author_link, get_the_author_msn
Source
function get_the_author_link() { if ( get_the_author_meta( 'url' ) ) { return sprintf( '<a href="%1$s" title="%2$s" rel="author external">%3$s</a>', esc_url( get_the_author_meta( 'url' ) ), /* translators: %s: Author's display name. */ esc_attr( sprintf( __( 'Visit %s’s website' ), get_the_author() ) ), get_the_author() ); } else { return get_the_author(); } }