comment_reply_link_args
Filter HookDescription
Filters the comment reply link arguments.Hook Information
File Location |
wp-includes/comment-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1815 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$args
|
Comment reply link arguments. See get_comment_reply_link() for more information on accepted arguments. |
WP_Comment
|
$comment
|
The object of the comment being replied to. |
WP_Post
|
$post
|
The WP_Post object. |
Usage Examples
Basic Usage
<?php
// Hook into comment_reply_link_args
add_filter('comment_reply_link_args', 'my_custom_filter', 10, 3);
function my_custom_filter($args, $comment, $post) {
// Your custom filtering logic here
return $args;
}
Source Code Context
wp-includes/comment-template.php:1815
- How this hook is used in WordPress core
<?php
1810 * @param array $args Comment reply link arguments. See get_comment_reply_link()
1811 * for more information on accepted arguments.
1812 * @param WP_Comment $comment The object of the comment being replied to.
1813 * @param WP_Post $post The WP_Post object.
1814 */
1815 $args = apply_filters( 'comment_reply_link_args', $args, $comment, $post );
1816
1817 if ( get_option( 'comment_registration' ) && ! is_user_logged_in() ) {
1818 $link = sprintf(
1819 '<a rel="nofollow" class="comment-reply-login" href="%s">%s</a>',
1820 esc_url( wp_login_url( get_permalink() ) ),
PHP Documentation
<?php
/**
* Filters the comment reply link arguments.
*
* @since 4.1.0
*
* @param array $args Comment reply link arguments. See get_comment_reply_link()
* for more information on accepted arguments.
* @param WP_Comment $comment The object of the comment being replied to.
* @param WP_Post $post The WP_Post object.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/comment-template.php
Related Hooks
Related hooks will be displayed here in future updates.