next_posts_link_attributes
Filter HookDescription
Filters the anchor tag attributes for the next posts page link.Hook Information
File Location |
wp-includes/link-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 2584 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$attributes
|
Attributes for the anchor tag. |
Usage Examples
Basic Usage
<?php
// Hook into next_posts_link_attributes
add_filter('next_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:2584
- How this hook is used in WordPress core
<?php
2579 *
2580 * @since 2.7.0
2581 *
2582 * @param string $attributes Attributes for the anchor tag.
2583 */
2584 $attr = apply_filters( 'next_posts_link_attributes', '' );
2585
2586 return sprintf(
2587 '<a href="%1$s" %2$s>%3$s</a>',
2588 next_posts( $max_page, false ),
2589 $attr,
PHP Documentation
<?php
/**
* Filters the anchor tag attributes for the next 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.