Filter hook 'the_author_posts_link'

in WP Core File wp-includes/author-template.php at line 335

View Source

the_author_posts_link

Filter Hook
Description
Filters the link to the author page of the author of the current post.

Hook Information

File Location wp-includes/author-template.php View on GitHub
Hook Type Filter
Line Number 335

Hook Parameters

Type Name Description
string $link HTML link.

Usage Examples

Basic Usage
<?php
// Hook into the_author_posts_link
add_filter('the_author_posts_link', 'my_custom_filter', 10, 1);

function my_custom_filter($link) {
    // Your custom filtering logic here
    return $link;
}

Source Code Context

wp-includes/author-template.php:335 - How this hook is used in WordPress core
<?php
 330  	 *
 331  	 * @since 2.9.0
 332  	 *
 333  	 * @param string $link HTML link.
 334  	 */
 335  	return apply_filters( 'the_author_posts_link', $link );
 336  }
 337  
 338  /**
 339   * Displays an HTML link to the author page of the current post's author.
 340   *

PHP Documentation

<?php
/**
	 * Filters the link to the author page of the author of the current post.
	 *
	 * @since 2.9.0
	 *
	 * @param string $link HTML link.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/author-template.php
Related Hooks

Related hooks will be displayed here in future updates.