Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/04/2011 08:36:45 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Force comment_status to 'closed' for forums, topics, and replies. Fixes #1676.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-reply-functions.php

    r3581 r3589  
    3131    // Forum
    3232    $default_reply = array(
    33         'post_parent'   => 0, // topic ID
    34         'post_status'   => bbp_get_public_status_id(),
    35         'post_type'     => bbp_get_reply_post_type(),
    36         'post_author'   => 0,
    37         'post_password' => '',
    38         'post_content'  => '',
    39         'post_title'    => '',
    40         'menu_order'    => 0,
     33        'post_parent'    => 0, // topic ID
     34        'post_status'    => bbp_get_public_status_id(),
     35        'post_type'      => bbp_get_reply_post_type(),
     36        'post_author'    => 0,
     37        'post_password'  => '',
     38        'post_content'   => '',
     39        'post_title'     => '',
     40        'menu_order'     => 0,
     41        'comment_status' => 'closed'
    4142    );
    4243
     
    232233        // Add the content of the form to $post as an array
    233234        $reply_data = array(
    234             'post_author'  => $reply_author,
    235             'post_title'   => $reply_title,
    236             'post_content' => $reply_content,
    237             'post_parent'  => $topic_id,
    238             'post_status'  => $post_status,
    239             'post_type'    => bbp_get_reply_post_type()
     235            'post_author'    => $reply_author,
     236            'post_title'     => $reply_title,
     237            'post_content'   => $reply_content,
     238            'post_parent'    => $topic_id,
     239            'post_status'    => $post_status,
     240            'post_type'      => bbp_get_reply_post_type(),
     241            'comment_status' => 'closed'
    240242        );
    241243
Note: See TracChangeset for help on using the changeset viewer.