Changeset 4637
- Timestamp:
- 12/23/2012 12:54:20 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/admin/converters/bbPress1.php
r4625 r4637 206 206 'to_fieldname' => 'post_status', 207 207 'callback_method' => 'callback_status' 208 );209 210 // Topic status (Publish or Closed to new replies)211 $this->field_map[] = array(212 'from_tablename' => 'topics',213 'from_fieldname' => 'topic_open',214 'to_type' => 'topic',215 'to_fieldname' => 'post_status',216 'callback_method' => 'callback_topic_status'217 208 ); 218 209 … … 528 519 } 529 520 530 /**531 * Translate the topic status from bbPress 1's numeric's to WordPress's532 * strings.533 *534 * @param int $topic_status bbPress 1.x numeric status535 * @return string WordPress safe536 */537 public function callback_topic_status( $topic_status = 1 ) {538 switch ( $topic_status ) {539 case 0 :540 $topic_status = 'closed'; // bbp_get_closed_status_id()541 break;542 543 case 1 :544 default :545 $topic_status = 'publish'; // bbp_get_public_status_id()546 break;547 }548 return $topic_status;549 }550 551 521 /** 552 522 * Verify the topic reply count.
Note: See TracChangeset
for help on using the changeset viewer.