get_comment_id_fields( int $id )
Retrieve hidden input HTML for replying to comments.
描述
参数
- $id
-
(int)
(Optional)
Post ID. Default current post ID.
返回值
(string) Hidden input HTML for replying to comments
源代码
File: wp-includes/comment-template.php
function get_comment_id_fields( $id = 0 ) {
if ( empty( $id ) )
$id = get_the_ID();
$replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0;
$result = "<input type='hidden' name='comment_post_ID' value='$id' id='comment_post_ID' />\n";
$result .= "<input type='hidden' name='comment_parent' id='comment_parent' value='$replytoid' />\n";
/**
* Filters the returned comment id fields.
*
* @since 3.0.0
*
* @param string $result The HTML-formatted hidden id field comment elements.
* @param int $id The post ID.
* @param int $replytoid The id of the comment being replied to.
*/
return apply_filters( 'comment_id_fields', $result, $id, $replytoid );
}
更新日志
Version | 描述 |
---|---|
3.0.0 | Introduced. |
相关函数
Uses
-
wp-includes/plugin.php:
apply_filters() -
wp-includes/post-template.php:
get_the_ID() -
wp-includes/comment-template.php:
comment_id_fields
Used By
-
wp-includes/comment-template.php:
comment_id_fields() -
wp-includes/comment-template.php:
comment_form()
你可能对这些文章感兴趣:
- wordpress函数has_filter()用法示例
- wordpress函数has_meta()用法示例
- wordpress函数has_excerpt()用法示例
- wordpress函数has_header_video()用法示例
- wordpress函数has_category()用法示例
- wordpress函数has_custom_logo()用法示例
- wordpress函数has_custom_header()用法示例
- wordpress函数hash_hmac()用法示例
- wordpress函数grant_super_admin()用法示例
- wordpress函数get_the_post_thumbnail_url()用法示例
- wordpress函数hash_equals()用法示例
- wordpress函数got_url_rewrite()用法示例
- wordpress函数gzip_compression()用法示例
- wordpress函数got_mod_rewrite()用法示例
如有疑问,请前往问答中心反馈!
反馈