Changeset 5170 for trunk/includes/admin/converters/bbPress1.php
- Timestamp:
- 11/23/2013 11:19:34 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/includes/admin/converters/bbPress1.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/admin/converters/bbPress1.php
r5136 r5170 251 251 ); 252 252 253 // Sticky status (Stored in postmeta)) 254 $this->field_map[] = array( 255 'from_tablename' => 'topics', 256 'from_fieldname' => 'topic_sticky', 257 'to_type' => 'topic', 258 'to_fieldname' => '_bbp_old_sticky_status', 259 'callback_method' => 'callback_sticky_status' 260 ); 261 253 262 // Topic dates. 254 263 $this->field_map[] = array( … … 358 367 359 368 // Reply slug (Clean name to avoid conflicts) 360 // Note: We join the 'topics' table because 'posts' table does not include topic title.369 // Note: We join the 'topics' table because 'posts' table does not include topic slug. 361 370 $this->field_map[] = array( 362 371 'from_tablename' => 'topics', … … 572 581 573 582 /** 583 * Translate the topic sticky status type from bbPress 1.x numeric's to WordPress's strings. 584 * 585 * @param int $status bbPress 1.x numeric forum type 586 * @return string WordPress safe 587 */ 588 public function callback_sticky_status( $status = 0 ) { 589 switch ( $status ) { 590 case 2 : 591 $status = 'super-sticky'; // bbPress Super Sticky 'topic_sticky = 2' 592 break; 593 594 case 1 : 595 $status = 'sticky'; // bbPress Sticky 'topic_sticky = 1' 596 break; 597 598 case 0 : 599 default : 600 $status = 'normal'; // bbPress Normal Topic 'topic_sticky = 0' 601 break; 602 } 603 return $status; 604 } 605 606 /** 574 607 * Verify the topic reply count. 575 608 *
Note: See TracChangeset
for help on using the changeset viewer.