Changeset 5170 for trunk/includes/admin/converters/XenForo.php
- Timestamp:
- 11/23/2013 11:19:34 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/includes/admin/converters/XenForo.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/admin/converters/XenForo.php
r5146 r5170 261 261 'to_fieldname' => 'post_parent', 262 262 'callback_method' => 'callback_forumid' 263 ); 264 265 // Sticky status (Stored in postmeta)) 266 $this->field_map[] = array( 267 'from_tablename' => 'thread', 268 'from_fieldname' => 'sticky', 269 'to_type' => 'topic', 270 'to_fieldname' => '_bbp_old_sticky_status', 271 'callback_method' => 'callback_sticky_status' 263 272 ); 264 273 … … 672 681 return $status; 673 682 } 683 684 /** 685 * Translate the topic sticky status type from XenForo numeric's to WordPress's strings. 686 * 687 * @param int $status XenForo numeric forum type 688 * @return string WordPress safe 689 */ 690 public function callback_sticky_status( $status = 0 ) { 691 switch ( $status ) { 692 case 1 : 693 $status = 'sticky'; // XenForo Sticky 'sticky = 1' 694 break; 695 696 case 0 : 697 default : 698 $status = 'normal'; // XenForo Normal Topic 'sticky = 0' 699 break; 700 } 701 return $status; 702 } 703 674 704 /** 675 705 * Verify the topic reply count.
Note: See TracChangeset
for help on using the changeset viewer.