Changeset 5170 for trunk/includes/admin/converters/Invision.php
- Timestamp:
- 11/23/2013 11:19:34 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/includes/admin/converters/Invision.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/admin/converters/Invision.php
r5148 r5170 215 215 ); 216 216 217 // Sticky status (Stored in postmeta)) 218 $this->field_map[] = array( 219 'from_tablename' => 'topics', 220 'from_fieldname' => 'pinned', 221 'to_type' => 'topic', 222 'to_fieldname' => '_bbp_old_sticky_status', 223 'callback_method' => 'callback_sticky_status' 224 ); 225 217 226 // Topic dates. 218 227 $this->field_map[] = array( … … 472 481 } else { 473 482 $status = 'forum'; 483 } 484 return $status; 485 } 486 487 /** 488 * Translate the topic sticky status type from Invision numeric's to WordPress's strings. 489 * 490 * @param int $status Invision numeric forum type 491 * @return string WordPress safe 492 */ 493 public function callback_sticky_status( $status = 0 ) { 494 switch ( $status ) { 495 case 1 : 496 $status = 'sticky'; // Invision Pinned Topic 'pinned = 1' 497 break; 498 499 case 0 : 500 default : 501 $status = 'normal'; // Invision Normal Topic 'pinned = 0' 502 break; 474 503 } 475 504 return $status;
Note: See TracChangeset
for help on using the changeset viewer.