author_link
Filters the URL to the author's page.
Usage
add_filter( 'author_link', 'wp_kama_author_link_filter', 10, 3 );
/**
* Function for `author_link` filter-hook.
*
* @param string $link The URL to the author's page.
* @param int $author_id The author's ID.
* @param string $author_nicename The author's nice name.
*
* @return string
*/
function wp_kama_author_link_filter( $link, $author_id, $author_nicename ){
// filter...
return $link;
}
- $link(string)
- The URL to the author's page.
- $author_id(int)
- The author's ID.
- $author_nicename(string)
- The author's nice name.
Changelog
| Since 2.1.0 | Introduced. |
Where the hook is called
author_link
wp-includes/author-template.php 413
$link = apply_filters( 'author_link', $link, $author_id, $author_nicename );