Filter hook 'cancel_comment_reply_link'

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

View Source

cancel_comment_reply_link

Filter Hook
Description
Filters the cancel comment reply link HTML.

Hook Information

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

Hook Parameters

Type Name Description
string $cancel_comment_reply_link The HTML-formatted cancel comment reply link.
string $link_url Cancel comment reply link URL.
string $link_text Cancel comment reply link text.

Usage Examples

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

function my_custom_filter($cancel_comment_reply_link, $link_url, $link_text) {
    // Your custom filtering logic here
    return $cancel_comment_reply_link;
}

Source Code Context

wp-includes/comment-template.php:2024 - How this hook is used in WordPress core
<?php
2019  	 *
2020  	 * @param string $cancel_comment_reply_link The HTML-formatted cancel comment reply link.
2021  	 * @param string $link_url                  Cancel comment reply link URL.
2022  	 * @param string $link_text                 Cancel comment reply link text.
2023  	 */
2024  	return apply_filters( 'cancel_comment_reply_link', $cancel_comment_reply_link, $link_url, $link_text );
2025  }
2026  
2027  /**
2028   * Displays HTML content for cancel comment reply link.
2029   *

PHP Documentation

<?php
/**
	 * Filters the cancel comment reply link HTML.
	 *
	 * @since 2.7.0
	 *
	 * @param string $cancel_comment_reply_link The HTML-formatted cancel comment reply link.
	 * @param string $link_url                  Cancel comment reply link URL.
	 * @param string $link_text                 Cancel comment reply link text.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-includes/comment-template.php
Related Hooks

Related hooks will be displayed here in future updates.