| 343 | // Update the default forum |
| 344 | $args = array( |
| 345 | 'post_type' => bbp_get_forum_post_type(), |
| 346 | 'meta_key' => '_bbp_forum_parent_id', |
| 347 | 'meta_value' => 0, |
| 348 | 'numberposts' => 1 |
| 349 | ); |
| 350 | |
| 351 | $posts = get_posts( $args ); |
| 352 | if ( $posts ) { |
| 353 | $default_forum = $posts[0]; |
| 354 | $post_arr = array( |
| 355 | 'ID' => $default_forum->ID, |
| 356 | 'post_title' => __( 'Group Forums', 'bbpress' ), |
| 357 | ); |
| 358 | wp_update_post( $post_arr ); |
| 359 | update_option( '_bbp_group_forums_root_id', $default_forum->ID ); |
| 360 | } |
| 361 | |