Filter hook 'comments_popup_link_attributes'

in WP Core File wp-includes/comment-template.php at line 1716

View Source

comments_popup_link_attributes

Filter Hook
Description
Filters the comments link attributes for display.

Hook Information

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

Hook Parameters

Type Name Description
string $link_attributes The comments link attributes. Default empty.

Usage Examples

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

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

Source Code Context

wp-includes/comment-template.php:1716 - How this hook is used in WordPress core
<?php
1711  	 *
1712  	 * @since 2.5.0
1713  	 *
1714  	 * @param string $link_attributes The comments link attributes. Default empty.
1715  	 */
1716  	$link_attributes = apply_filters( 'comments_popup_link_attributes', $link_attributes );
1717  
1718  	printf(
1719  		'<a href="%1$s"%2$s%3$s>%4$s</a>',
1720  		esc_url( $comments_link ),
1721  		! empty( $css_class ) ? ' class="' . $css_class . '" ' : '',

PHP Documentation

<?php
/**
	 * Filters the comments link attributes for display.
	 *
	 * @since 2.5.0
	 *
	 * @param string $link_attributes The comments link attributes. Default empty.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/comment-template.php
Related Hooks

Related hooks will be displayed here in future updates.