Changeset 4625
- Timestamp:
- 12/22/2012 07:01:23 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/includes/admin/converters/bbPress1.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/admin/converters/bbPress1.php
r4006 r4625 196 196 ); 197 197 198 // Topic status. 199 // Note: post_status is more accurate than topic_status 198 // Post status (Spam, Trash or Publish) 200 199 $this->field_map[] = array( 201 200 'from_tablename' => 'posts', … … 207 206 'to_fieldname' => 'post_status', 208 207 'callback_method' => 'callback_status' 208 ); 209 210 // Topic status (Publish or Closed to new replies) 211 $this->field_map[] = array( 212 'from_tablename' => 'topics', 213 'from_fieldname' => 'topic_open', 214 'to_type' => 'topic', 215 'to_fieldname' => 'post_status', 216 'callback_method' => 'callback_topic_status' 209 217 ); 210 218 … … 520 528 } 521 529 530 /** 531 * Translate the topic status from bbPress 1's numeric's to WordPress's 532 * strings. 533 * 534 * @param int $topic_status bbPress 1.x numeric status 535 * @return string WordPress safe 536 */ 537 public function callback_topic_status( $topic_status = 1 ) { 538 switch ( $topic_status ) { 539 case 0 : 540 $topic_status = 'closed'; // bbp_get_closed_status_id() 541 break; 542 543 case 1 : 544 default : 545 $topic_status = 'publish'; // bbp_get_public_status_id() 546 break; 547 } 548 return $topic_status; 549 } 550 522 551 /** 523 552 * Verify the topic reply count.
Note: See TracChangeset
for help on using the changeset viewer.