Changeset 5517
- Timestamp:
- 09/13/2014 03:07:28 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/admin/converters/bbPress1.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/converters/bbPress1.php
r5516 r5517 237 237 ); 238 238 239 // Topic status (Publish or Closed to new replies) 240 $this->field_map[] = array( 241 'from_tablename' => 'topics', 242 'from_fieldname' => 'topic_open', 243 'to_type' => 'topic', 244 'to_fieldname' => '_bbp_old_closed_status_id', 245 'callback_method' => 'callback_topic_status' 246 ); 247 239 248 // Topic author ip (Stored in postmeta) 240 249 // Note: We join the 'posts' table because 'topics' table does not include author ip. … … 574 583 575 584 /** 585 * Translate the topic status from bbPress 1's numeric's to WordPress's 586 * strings. 587 * 588 * @param int $topic_status bbPress 1.x numeric status 589 * @return string WordPress safe 590 */ 591 public function callback_topic_status( $topic_status = 1 ) { 592 switch ( $topic_status ) { 593 case 0 : 594 $topic_status = 'closed'; // bbp_get_closed_status_id() 595 break; 596 597 case 1 : 598 default : 599 $topic_status = 'publish'; // bbp_get_public_status_id() 600 break; 601 } 602 return $topic_status; 603 } 604 605 /** 576 606 * Translate the topic sticky status type from bbPress 1.x numeric's to WordPress's strings. 577 607 *
Note: See TracChangeset
for help on using the changeset viewer.