previous_posts_link_attributes
Filters the anchor tag attributes for the previous posts page link.
Usage
add_filter( 'previous_posts_link_attributes', 'wp_kama_previous_posts_link_attributes_filter' ); /** * Function for `previous_posts_link_attributes` filter-hook. * * @param string $attributes Attributes for the anchor tag. * * @return string */ function wp_kama_previous_posts_link_attributes_filter( $attributes ){ // filter... return $attributes; }
- $attributes(string)
- Attributes for the anchor tag.
Changelog
Since 2.7.0 | Introduced. |
Where the hook is called
previous_posts_link_attributes
wp-includes/link-template.php 2677
$attr = apply_filters( 'previous_posts_link_attributes', '' );
Where the hook is used in WordPress
wp-includes/blocks/query-pagination-previous.php 44
add_filter( 'previous_posts_link_attributes', $filter_link_attributes );
wp-includes/blocks/query-pagination-previous.php 46
remove_filter( 'previous_posts_link_attributes', $filter_link_attributes );