Make WordPress Core


Ignore:
Timestamp:
12/10/2008 09:06:13 PM (17 years ago)
Author:
ryan
Message:

Post reply API updates. see #8550

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment-template.php

    r10169 r10178  
    10051005    echo get_comment_reply_link($args, $comment, $post);
    10061006}
     1007
    10071008/**
    10081009 * Retrieve HTML content for reply to post link.
     
    10181019 *
    10191020 * @param array $args Optional. Override default options.
    1020  * @param int $post Optional. Post that the comment is going to be displayed on.
     1021 * @param int|object $post Optional. Post that the comment is going to be displayed on.  Defaults to current post.
    10211022 * @return string|bool|null Link to show comment form, if successful. False, if comments are closed.
    10221023 */
    1023 
    1024 
    1025 function get_post_comments_link($args = array(), $comment = null, $post = null) {
     1024function get_post_reply_link($args = array(), $post = null) {
    10261025    global $user_ID;
    10271026
    1028     $defaults = array('add_below' => 'prologue', 'respond_id' => 'respond', 'reply_text' => __('Leave a Comment'),
     1027    $defaults = array('add_below' => 'comment', 'respond_id' => 'respond', 'reply_text' => __('Leave a Comment'),
    10291028        'login_text' => __('Log in to leave a Comment'), 'before' => '', 'after' => '');
    10301029
     
    10331032    $post = get_post($post);
    10341033   
    1035     if ( 'open' != $post->comment_status )
     1034    if ( !comments_open($post->ID) )
    10361035        return false;
    10371036
     
    10471046 * Displays the HTML content for reply to post link.
    10481047 * @since 2.7.0
    1049  * @see get_post_comments_link() Echoes result
     1048 * @see get_post_reply_link()
    10501049 *
    10511050 * @param array $args Optional. Override default options.
    1052  * @param int $post Optional. Post that the comment is going to be displayed on.
     1051 * @param int|object $post Optional. Post that the comment is going to be displayed on.
    10531052 * @return string|bool|null Link to show comment form, if successful. False, if comments are closed.
    10541053 */
    1055 function post_comments_link ($args = array(), $post = null) {
     1054function post_reply_link($args = array(), $post = null) {
    10561055    echo get_post_comments_link($args, $post);
    10571056}
Note: See TracChangeset for help on using the changeset viewer.