Changeset 5170 for trunk/includes/admin/converters/SimplePress5.php
- Timestamp:
- 11/23/2013 11:19:34 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/includes/admin/converters/SimplePress5.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/admin/converters/SimplePress5.php
r5151 r5170 206 206 ); 207 207 208 // Topic dates.209 $this->field_map[] = array(210 'from_tablename' => 'sftopics',211 'from_fieldname' => 'topic_date',212 'to_type' => 'topic',213 'to_fieldname' => 'post_date'214 );215 $this->field_map[] = array(216 'from_tablename' => 'sftopics',217 'from_fieldname' => 'topic_date',218 'to_type' => 'topic',219 'to_fieldname' => 'post_date_gmt'220 );221 $this->field_map[] = array(222 'from_tablename' => 'sftopics',223 'from_fieldname' => 'topic_date',224 'to_type' => 'topic',225 'to_fieldname' => 'post_modified'226 );227 $this->field_map[] = array(228 'from_tablename' => 'sftopics',229 'from_fieldname' => 'topic_date',230 'to_type' => 'topic',231 'to_fieldname' => 'post_modified_gmt'232 );233 $this->field_map[] = array(234 'from_tablename' => 'sftopics',235 'from_fieldname' => 'topic_date',236 'to_type' => 'topic',237 'to_fieldname' => '_bbp_last_active_time'238 );239 240 208 // Topic status (Open or Closed) 241 209 $this->field_map[] = array( … … 245 213 'to_fieldname' => 'post_status', 246 214 'callback_method' => 'callback_status' 215 ); 216 217 // Sticky status (Stored in postmeta)) 218 $this->field_map[] = array( 219 'from_tablename' => 'sftopics', 220 'from_fieldname' => 'topic_pinned', 221 'to_type' => 'topic', 222 'to_fieldname' => '_bbp_old_sticky_status', 223 'callback_method' => 'callback_sticky_status' 224 ); 225 226 // Topic dates. 227 $this->field_map[] = array( 228 'from_tablename' => 'sftopics', 229 'from_fieldname' => 'topic_date', 230 'to_type' => 'topic', 231 'to_fieldname' => 'post_date' 232 ); 233 $this->field_map[] = array( 234 'from_tablename' => 'sftopics', 235 'from_fieldname' => 'topic_date', 236 'to_type' => 'topic', 237 'to_fieldname' => 'post_date_gmt' 238 ); 239 $this->field_map[] = array( 240 'from_tablename' => 'sftopics', 241 'from_fieldname' => 'topic_date', 242 'to_type' => 'topic', 243 'to_fieldname' => 'post_modified' 244 ); 245 $this->field_map[] = array( 246 'from_tablename' => 'sftopics', 247 'from_fieldname' => 'topic_date', 248 'to_type' => 'topic', 249 'to_fieldname' => 'post_modified_gmt' 250 ); 251 $this->field_map[] = array( 252 'from_tablename' => 'sftopics', 253 'from_fieldname' => 'topic_date', 254 'to_type' => 'topic', 255 'to_fieldname' => '_bbp_last_active_time' 247 256 ); 248 257 … … 483 492 default : 484 493 $status = 'publish'; 494 break; 495 } 496 return $status; 497 } 498 499 /** 500 * Translate the topic sticky status type from Simple:Press v5.x numeric's to WordPress's strings. 501 * 502 * @param int $status Simple:Press v5.x numeric forum type 503 * @return string WordPress safe 504 */ 505 public function callback_sticky_status( $status = 0 ) { 506 switch ( $status ) { 507 case 1 : 508 $status = 'sticky'; // Simple:Press Sticky 'topic_sticky = 1' 509 break; 510 511 case 0 : 512 default : 513 $status = 'normal'; // Simple:Press Normal Topic 'topic_sticky = 0' 485 514 break; 486 515 }
Note: See TracChangeset
for help on using the changeset viewer.