首页 WordPress函数大全 get_comment_reply_link()

get_comment_reply_link()

2020-05-01 / 3345阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

get_comment_reply_link( array $args = array(), int|WP_Comment $comment = null, int|WP_Post $post = null )

Retrieves HTML content for reply to comment link.

描述

参数

$args

(array)
(Optional)
Override default arguments.

  • 'add_below'
    (string) The first part of the selector used to identify the comment to respond below. The resulting value is passed as the first parameter to addComment.moveForm(), concatenated as $add_below-$comment->comment_ID. Default 'comment'.
  • 'respond_id'
    (string) The selector identifying the responding comment. Passed as the third parameter to addComment.moveForm(), and appended to the link URL as a hash value. Default 'respond'.
  • 'reply_text'
    (string) The text of the Reply link. Default 'Reply'.
  • 'login_text'
    (string) The text of the link to reply if logged out. Default 'Log in to Reply'.
  • 'max_depth'
    (int) The max depth of the comment tree. Default 0.
  • 'depth'
    (int) The depth of the new comment. Must be greater than 0 and less than the value of the 'thread_comments_depth' option set in Settings > Discussion. Default 0.
  • 'before'
    (string) The text or HTML to add before the reply link.
  • 'after'
    (string) The text or HTML to add after the reply link.

Default value: array()

$comment

(int|WP_Comment)
(Optional)
Comment being replied to. Default current comment.

Default value: null

$post

(int|WP_Post)
(Optional)
Post ID or WP_Post object the comment is going to be displayed>Default value: null

返回

(string|false|null) Link to show comment form, if successful. False, if comments are closed.

大家谈论
    我的见解