respond_link
Filter HookDescription
Filters the respond link when a post has no comments.Hook Information
File Location |
wp-includes/comment-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1702 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$respond_link
|
The default response link. |
int
|
$post_id
|
The post ID. |
Usage Examples
Basic Usage
<?php
// Hook into respond_link
add_filter('respond_link', 'my_custom_filter', 10, 2);
function my_custom_filter($respond_link, $post_id) {
// Your custom filtering logic here
return $respond_link;
}
Source Code Context
wp-includes/comment-template.php:1702
- How this hook is used in WordPress core
<?php
1697 * @since 4.4.0
1698 *
1699 * @param string $respond_link The default response link.
1700 * @param int $post_id The post ID.
1701 */
1702 $comments_link = apply_filters( 'respond_link', $respond_link, $post_id );
1703 } else {
1704 $comments_link = get_comments_link();
1705 }
1706
1707 $link_attributes = '';
PHP Documentation
<?php
/**
* Filters the respond link when a post has no comments.
*
* @since 4.4.0
*
* @param string $respond_link The default response link.
* @param int $post_id The post ID.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/comment-template.php
Related Hooks
Related hooks will be displayed here in future updates.