previous_posts_link_attributes
Filter HookDescription
Filters the anchor tag attributes for the previous posts page link.Hook Information
File Location |
wp-includes/link-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 2677 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$attributes
|
Attributes for the anchor tag. |
Usage Examples
Basic Usage
<?php
// Hook into previous_posts_link_attributes
add_filter('previous_posts_link_attributes', 'my_custom_filter', 10, 1);
function my_custom_filter($attributes) {
// Your custom filtering logic here
return $attributes;
}
Source Code Context
wp-includes/link-template.php:2677
- How this hook is used in WordPress core
<?php
2672 *
2673 * @since 2.7.0
2674 *
2675 * @param string $attributes Attributes for the anchor tag.
2676 */
2677 $attr = apply_filters( 'previous_posts_link_attributes', '' );
2678
2679 return sprintf(
2680 '<a href="%1$s" %2$s>%3$s</a>',
2681 previous_posts( false ),
2682 $attr,
PHP Documentation
<?php
/**
* Filters the anchor tag attributes for the previous posts page link.
*
* @since 2.7.0
*
* @param string $attributes Attributes for the anchor tag.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/link-template.php
Related Hooks
Related hooks will be displayed here in future updates.