comment_reply_link() - WordPress 函数参考中文文档

返回介绍

comment_reply_link()

发布于 2017-09-10 字数2518 浏览 1210 评论 0

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

Displays the HTML content for reply to comment link.


描述


参数

$args

(array)
(Optional)
Override default options.

Default value: array()

$comment

(int)
(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 on. Default current post.

Default value: null


返回值

(mixed) Link to show comment form, if successful. False, if comments are closed.


源代码

File: wp-includes/comment-template.php

function comment_reply_link($args = array(), $comment = null, $post = null) {
	echo get_comment_reply_link($args, $comment, $post);
}

更新日志

Version 描述
2.7.0 Introduced.

相关函数

Uses

  • wp-includes/comment-template.php:
    get_comment_reply_link()

Used By

  • wp-includes/class-walker-comment.php:
    Walker_Comment::comment()
  • wp-includes/class-walker-comment.php:
    Walker_Comment::html5_comment()

User Contributed Notes

  1. Skip to note content

    You must log in to vote on the helpfulness of this noteVote results for this note: 0You must log in to vote on the helpfulness of this note

    Contributed by Codex

    Usage

    <?php comment_reply_link( $args, $comment, $post ); ?>
  2. <?php comment_reply_link( array_merge($args, array(
        'reply_text' => __('Responder <span>&darr;</span>', 'textdomain'),
        'depth'      => $depth,
        'max_depth'  => $args['max_depth']
        )
    )); ?>

上一篇:comment_link()

下一篇:comment_text()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!