next_comments_link_attributes
Filter HookDescription
Filters the anchor tag attributes for the next comments page link.Hook Information
File Location |
wp-includes/link-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3160 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$attributes
|
Attributes for the anchor tag. |
Usage Examples
Basic Usage
<?php
// Hook into next_comments_link_attributes
add_filter('next_comments_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:3160
- How this hook is used in WordPress core
<?php
3155 *
3156 * @since 2.7.0
3157 *
3158 * @param string $attributes Attributes for the anchor tag.
3159 */
3160 $attr = apply_filters( 'next_comments_link_attributes', '' );
3161
3162 return sprintf(
3163 '<a href="%1$s" %2$s>%3$s</a>',
3164 esc_url( get_comments_pagenum_link( $next_page, $max_page ) ),
3165 $attr,
PHP Documentation
<?php
/**
* Filters the anchor tag attributes for the next comments 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.