Skip to:
Content

bbPress.org

Ticket #1776: 1776.01.patch

File 1776.01.patch, 1.3 KB (added by boonebgorges, 13 years ago)
  • bbp-includes/bbp-extend-buddypress.php

     
    12531253                                        'post_status'  => $status
    12541254                                ) );
    12551255
    1256                                 // Create the initial topic
    1257                                 $topic_id = bbp_insert_topic(
    1258                                         array(
    1259                                                 'post_parent'  => $forum_id,
    1260                                                 'post_title'   => __( 'Hello World!', 'bbpress' ),
    1261                                                 'post_content' => __( 'I am the first topic in your group forum. You can keep me, edit me, trash me, or delete me.', 'bbpress' )
    1262                                         ),
    1263                                         array( 'forum_id'  => $forum_id )
    1264                                 );
    1265 
    1266                                 // Create the initial reply
    1267                                 $reply_id = bbp_insert_reply(
    1268                                         array(
    1269                                                 'post_parent'  => $topic_id,
    1270                                                 'post_title'   => __( 'Re: Hello World!', 'bbpress' ),
    1271                                                 'post_content' => __( 'Oh, and this is what a reply looks like.', 'bbpress' )
    1272                                         ),
    1273                                         array(
    1274                                                 'forum_id'     => $forum_id,
    1275                                                 'topic_id'     => $topic_id
    1276                                         )
    1277                                 );
    1278 
    12791256                                // Add the ID's to group meta
    12801257                                groups_update_groupmeta( bp_get_new_group_id(), 'forum_id',       $forum_id );
    1281                                 groups_update_groupmeta( bp_get_new_group_id(), 'first_topic_id', $topic_id );
    1282                                 groups_update_groupmeta( bp_get_new_group_id(), 'first_reply_id', $reply_id );
    12831258
    12841259                                break;
    12851260                        case false :