Changeset 4487
- Timestamp:
- 11/23/2012 11:20:42 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/core/update.php
r4439 r4487 159 159 function bbp_create_initial_content( $args = array() ) { 160 160 161 $ defaults =array(161 $r = bbp_parse_args( $args, array( 162 162 'forum_parent' => 0, 163 163 'forum_status' => 'publish', … … 168 168 'reply_title' => __( 'Re: Hello World!', 'bbpress' ), 169 169 'reply_content' => __( 'Oh, and this is what a reply looks like.', 'bbpress' ), 170 ); 171 $r = bbp_parse_args( $args, $defaults, 'create_initial_content' ); 172 extract( $r ); 170 ), 'create_initial_content' ); 173 171 174 172 // Create the initial forum 175 173 $forum_id = bbp_insert_forum( array( 176 'post_parent' => $ forum_parent,177 'post_status' => $ forum_status,178 'post_title' => $ forum_title,179 'post_content' => $ forum_content174 'post_parent' => $r['forum_parent'], 175 'post_status' => $r['forum_status'], 176 'post_title' => $r['forum_title'], 177 'post_content' => $r['forum_content'] 180 178 ) ); 181 179 … … 183 181 $topic_id = bbp_insert_topic( 184 182 array( 185 'post_parent' => $forum_id,186 'post_title' => $ topic_title,187 'post_content' => $ topic_content183 'post_parent' => forum_id, 184 'post_title' => $r['topic_title'], 185 'post_content' => $r['topic_content'] 188 186 ), 189 187 array( 'forum_id' => $forum_id ) … … 194 192 array( 195 193 'post_parent' => $topic_id, 196 'post_title' => $r eply_title,197 'post_content' => $r eply_content194 'post_title' => $r['reply_title'], 195 'post_content' => $r['reply_content'] 198 196 ), 199 197 array(
Note: See TracChangeset
for help on using the changeset viewer.