Changeset 3505 for branches/plugin/bbp-admin/importers/bbpress.php
- Timestamp:
- 09/10/2011 10:27:19 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-admin/importers/bbpress.php
r3376 r3505 880 880 881 881 $forum_map = array(); 882 $post_statuses = array( 'publish', $bbp->trash_status_id, $bbp->spam_status_id);882 $post_statuses = array( bbp_get_public_status_id(), bbp_get_trash_status_id(), bbp_get_spam_status_id() ); 883 883 884 884 foreach ( (array) $forums as $forum ) { … … 891 891 'post_title' => $forum->forum_name, 892 892 'post_excerpt' => '', 893 'post_status' => 'publish',893 'post_status' => bbp_get_public_status_id(), 894 894 'comment_status' => 'closed', 895 895 'ping_status' => 'closed', … … 944 944 945 945 // If the topic is public, check if it's open and set the status accordingly 946 $topic_status = $topic->topic_status == 0 ? ( $topic->topic_open == 0 ? $bbp->closed_status_id: $post_statuses[$topic->topic_status] ) : $post_statuses[$topic->topic_status];946 $topic_status = $topic->topic_status == 0 ? ( $topic->topic_open == 0 ? bbp_get_closed_status_id() : $post_statuses[$topic->topic_status] ) : $post_statuses[$topic->topic_status]; 947 947 948 948 $inserted_topic = wp_insert_post( array( … … 1038 1038 1039 1039 // Only add favorites and subscriptions if the topic is public 1040 if ( in_array( $topic_status, array( 'publish', $bbp->closed_status_id) ) ) {1040 if ( in_array( $topic_status, array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ) ) { 1041 1041 1042 1042 // Favorites
Note: See TracChangeset
for help on using the changeset viewer.