get_cancel_comment_reply_link
函数
get_cancel_comment_reply_link ( $text = '' )
- 参数
-
-
(string)
$text
Optional. Text to display for cancel reply link. If empty, defaults to ‘Click here to cancel reply’. Default empty.- Required: 否
- Default: (empty)
-
(string)
- 返回值
-
- (string)
- 定义位置
-
-
wp-includes/comment-template.php
, line 1892
-
wp-includes/comment-template.php
- 引入
- 2.7.0
- 弃用
- –
Retrieves HTML content for cancel comment reply link.
function get_cancel_comment_reply_link( $text = '' ) {
if ( empty( $text ) ) {
$text = __( 'Click here to cancel reply.' );
}
$style = isset( $_GET['replytocom'] ) ? '' : ' style="display:none;"';
$link = esc_html( remove_query_arg( array( 'replytocom', 'unapproved', 'moderation-hash' ) ) ) . '#respond';
$formatted_link = '' . $text . '';
/**
* Filters the cancel comment reply link HTML.
*
* @since 2.7.0
*
* @param string $formatted_link The HTML-formatted cancel comment reply link.
* @param string $link Cancel comment reply link URL.
* @param string $text Cancel comment reply link text.
*/
return apply_filters( 'cancel_comment_reply_link', $formatted_link, $link, $text );
}
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。