Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/04/2011 08:36:45 PM (13 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-topic-functions.php

    r3581 r3589  
    3131    // Forum
    3232    $default_topic = array(
    33         'post_parent'   => 0, // forum ID
    34         'post_status'   => bbp_get_public_status_id(),
    35         'post_type'     => bbp_get_topic_post_type(),
    36         'post_author'   => 0,
    37         'post_password' => '',
    38         'post_content'  => '',
    39         'post_title'    => '',
    40         'menu_order'    => 0,
     33        'post_parent'    => 0, // forum ID
     34        'post_status'    => bbp_get_public_status_id(),
     35        'post_type'      => bbp_get_topic_post_type(),
     36        'post_author'    => 0,
     37        'post_password'  => '',
     38        'post_content'   => '',
     39        'post_title'     => '',
     40        'comment_status' => 'closed',
     41        'menu_order'     => 0,
    4142    );
    4243
     
    267268        // Add the content of the form to $post as an array
    268269        $topic_data = array(
    269             'post_author'  => $topic_author,
    270             'post_title'   => $topic_title,
    271             'post_content' => $topic_content,
    272             'post_parent'  => $forum_id,
    273             'tax_input'    => $terms,
    274             'post_status'  => $post_status,
    275             'post_type'    => bbp_get_topic_post_type()
     270            'post_author'    => $topic_author,
     271            'post_title'     => $topic_title,
     272            'post_content'   => $topic_content,
     273            'post_parent'    => $forum_id,
     274            'post_status'    => $post_status,
     275            'post_type'      => bbp_get_topic_post_type(),
     276            'tax_input'      => $terms,
     277            'comment_status' => 'closed'
    276278        );
    277279
Note: See TracChangeset for help on using the changeset viewer.