comment_reply_link
Filter HookDescription
Filters the comment reply link.Hook Information
File Location |
wp-includes/comment-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1876 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$comment_reply_link
|
The HTML markup for the comment reply link. |
array
|
$args
|
An array of arguments overriding the defaults. |
WP_Comment
|
$comment
|
The object of the comment being replied. |
WP_Post
|
$post
|
The WP_Post object. |
Usage Examples
Basic Usage
<?php
// Hook into comment_reply_link
add_filter('comment_reply_link', 'my_custom_filter', 10, 4);
function my_custom_filter($comment_reply_link, $args, $comment, $post) {
// Your custom filtering logic here
return $comment_reply_link;
}
Source Code Context
wp-includes/comment-template.php:1876
- How this hook is used in WordPress core
<?php
1871 * @param string $comment_reply_link The HTML markup for the comment reply link.
1872 * @param array $args An array of arguments overriding the defaults.
1873 * @param WP_Comment $comment The object of the comment being replied.
1874 * @param WP_Post $post The WP_Post object.
1875 */
1876 return apply_filters( 'comment_reply_link', $comment_reply_link, $args, $comment, $post );
1877 }
1878
1879 /**
1880 * Displays the HTML content for reply to comment link.
1881 *
PHP Documentation
<?php
/**
* Filters the comment reply link.
*
* @since 2.7.0
*
* @param string $comment_reply_link The HTML markup for the comment reply link.
* @param array $args An array of arguments overriding the defaults.
* @param WP_Comment $comment The object of the comment being replied.
* @param WP_Post $post The WP_Post object.
*/
Quick Info
- Hook Type: Filter
- Parameters: 4
- File: wp-includes/comment-template.php
Related Hooks
Related hooks will be displayed here in future updates.