author_link
Filter HookDescription
Filters the URL to the author's page.Hook Information
File Location |
wp-includes/author-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 393 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$link
|
The URL to the author's page. |
int
|
$author_id
|
The author's ID. |
string
|
$author_nicename
|
The author's nice name. |
Usage Examples
Basic Usage
<?php
// Hook into author_link
add_filter('author_link', 'my_custom_filter', 10, 3);
function my_custom_filter($link, $author_id, $author_nicename) {
// Your custom filtering logic here
return $link;
}
Source Code Context
wp-includes/author-template.php:393
- How this hook is used in WordPress core
<?php
388 *
389 * @param string $link The URL to the author's page.
390 * @param int $author_id The author's ID.
391 * @param string $author_nicename The author's nice name.
392 */
393 $link = apply_filters( 'author_link', $link, $author_id, $author_nicename );
394
395 return $link;
396 }
397
398 /**
PHP Documentation
<?php
/**
* Filters the URL to the author's page.
*
* @since 2.1.0
*
* @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.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/author-template.php
Related Hooks
Related hooks will be displayed here in future updates.