PHPFox3

Implementation of PHPFox v3.x Forum converter.

Defined (1)

The class is defined in the following location(s).

/includes/admin/converters/PHPFox3.php  
  1. class PHPFox3 extends BBP_Converter_Base { 
  2.  
  3. /** 
  4. * Main Constructor 
  5. * @uses PHPFox3::setup_globals() 
  6. */ 
  7. function __construct() { 
  8. parent::__construct(); 
  9. $this->setup_globals(); 
  10.  
  11. /** 
  12. * Sets up the field mappings 
  13. */ 
  14. public function setup_globals() { 
  15.  
  16. /** Forum Section *****************************************************/ 
  17.  
  18. // Forum id (Stored in postmeta) 
  19. $this->field_map[] = array( 
  20. 'from_tablename' => 'forum',  
  21. 'from_fieldname' => 'forum_id',  
  22. 'to_type' => 'forum',  
  23. 'to_fieldname' => '_bbp_forum_id' 
  24. ); 
  25.  
  26. // Forum parent id (If no parent, then 0, Stored in postmeta) 
  27. $this->field_map[] = array( 
  28. 'from_tablename' => 'forum',  
  29. 'from_fieldname' => 'parent_id',  
  30. 'to_type' => 'forum',  
  31. 'to_fieldname' => '_bbp_forum_parent_id' 
  32. ); 
  33.  
  34. // Forum topic count (Stored in postmeta) 
  35. $this->field_map[] = array( 
  36. 'from_tablename' => 'forum',  
  37. 'from_fieldname' => 'total_thread',  
  38. 'to_type' => 'forum',  
  39. 'to_fieldname' => '_bbp_topic_count' 
  40. ); 
  41.  
  42. // Forum reply count (Stored in postmeta) 
  43. $this->field_map[] = array( 
  44. 'from_tablename' => 'forum',  
  45. 'from_fieldname' => 'total_post',  
  46. 'to_type' => 'forum',  
  47. 'to_fieldname' => '_bbp_reply_count' 
  48. ); 
  49.  
  50. // Forum total topic count (Stored in postmeta) 
  51. $this->field_map[] = array( 
  52. 'from_tablename' => 'forum',  
  53. 'from_fieldname' => 'total_thread',  
  54. 'to_type' => 'forum',  
  55. 'to_fieldname' => '_bbp_total_topic_count' 
  56. ); 
  57.  
  58. // Forum total reply count (Stored in postmeta) 
  59. $this->field_map[] = array( 
  60. 'from_tablename' => 'forum',  
  61. 'from_fieldname' => 'total_post',  
  62. 'to_type' => 'forum',  
  63. 'to_fieldname' => '_bbp_total_reply_count' 
  64. ); 
  65.  
  66. // Forum title. 
  67. $this->field_map[] = array( 
  68. 'from_tablename' => 'forum',  
  69. 'from_fieldname' => 'name',  
  70. 'to_type' => 'forum',  
  71. 'to_fieldname' => 'post_title' 
  72. ); 
  73.  
  74. // Forum slug (Clean name to avoid conflicts) 
  75. $this->field_map[] = array( 
  76. 'from_tablename' => 'forum',  
  77. 'from_fieldname' => 'name_url',  
  78. 'to_type' => 'forum',  
  79. 'to_fieldname' => 'post_name',  
  80. 'callback_method' => 'callback_slug' 
  81. ); 
  82.  
  83. // Forum description. 
  84. $this->field_map[] = array( 
  85. 'from_tablename' => 'forum',  
  86. 'from_fieldname' => 'description',  
  87. 'to_type' => 'forum',  
  88. 'to_fieldname' => 'post_content',  
  89. 'callback_method' => 'callback_null' 
  90. ); 
  91.  
  92. // Forum display order (Starts from 1) 
  93. $this->field_map[] = array( 
  94. 'from_tablename' => 'forum',  
  95. 'from_fieldname' => 'ordering',  
  96. 'to_type' => 'forum',  
  97. 'to_fieldname' => 'menu_order' 
  98. ); 
  99.  
  100. // Forum type (Forum = 0 or Category = 1, Stored in postmeta) 
  101. $this->field_map[] = array( 
  102. 'from_tablename' => 'forum',  
  103. 'from_fieldname' => 'is_category',  
  104. 'to_type' => 'forum',  
  105. 'to_fieldname' => '_bbp_forum_type',  
  106. 'callback_method' => 'callback_forum_type' 
  107. ); 
  108.  
  109. // Forum status (0=Open or 1=Closed, Stored in postmeta) 
  110. $this->field_map[] = array( 
  111. 'from_tablename' => 'forum',  
  112. 'from_fieldname' => 'is_closed',  
  113. 'to_type' => 'forum',  
  114. 'to_fieldname' => '_bbp_status',  
  115. 'callback_method' => 'callback_forum_status' 
  116. ); 
  117.  
  118. // Forum dates. 
  119. $this->field_map[] = array( 
  120. 'to_type' => 'forum',  
  121. 'to_fieldname' => 'post_date',  
  122. 'default' => date('Y-m-d H:i:s') 
  123. ); 
  124. $this->field_map[] = array( 
  125. 'to_type' => 'forum',  
  126. 'to_fieldname' => 'post_date_gmt',  
  127. 'default' => date('Y-m-d H:i:s') 
  128. ); 
  129. $this->field_map[] = array( 
  130. 'to_type' => 'forum',  
  131. 'to_fieldname' => 'post_modified',  
  132. 'default' => date('Y-m-d H:i:s') 
  133. ); 
  134. $this->field_map[] = array( 
  135. 'to_type' => 'forum',  
  136. 'to_fieldname' => 'post_modified_gmt',  
  137. 'default' => date('Y-m-d H:i:s') 
  138. ); 
  139.  
  140. /** Topic Section *****************************************************/ 
  141.  
  142. // Topic id (Stored in postmeta) 
  143. $this->field_map[] = array( 
  144. 'from_tablename' => 'forum_thread',  
  145. 'from_fieldname' => 'thread_id',  
  146. 'to_type' => 'topic',  
  147. 'to_fieldname' => '_bbp_topic_id' 
  148. ); 
  149.  
  150. // Topic reply count (Stored in postmeta) 
  151. $this->field_map[] = array( 
  152. 'from_tablename' => 'forum_thread',  
  153. 'from_fieldname' => 'total_post',  
  154. 'to_type' => 'topic',  
  155. 'to_fieldname' => '_bbp_reply_count',  
  156. 'callback_method' => 'callback_topic_reply_count' 
  157. ); 
  158.  
  159. // Topic total reply count (Includes unpublished replies, Stored in postmeta) 
  160. $this->field_map[] = array( 
  161. 'from_tablename' => 'forum_thread',  
  162. 'from_fieldname' => 'total_post',  
  163. 'to_type' => 'topic',  
  164. 'to_fieldname' => '_bbp_total_reply_count',  
  165. 'callback_method' => 'callback_topic_reply_count' 
  166. ); 
  167.  
  168. // Topic parent forum id (If no parent, then 0. Stored in postmeta) 
  169. $this->field_map[] = array( 
  170. 'from_tablename' => 'forum_thread',  
  171. 'from_fieldname' => 'forum_id',  
  172. 'to_type' => 'topic',  
  173. 'to_fieldname' => '_bbp_forum_id',  
  174. 'callback_method' => 'callback_forumid' 
  175. ); 
  176.  
  177. // Topic author. 
  178. $this->field_map[] = array( 
  179. 'from_tablename' => 'forum_thread',  
  180. 'from_fieldname' => 'user_id',  
  181. 'to_type' => 'topic',  
  182. 'to_fieldname' => 'post_author',  
  183. 'callback_method' => 'callback_userid' 
  184. ); 
  185.  
  186. // Topic content. 
  187. // Note: We join the 'forum_post_text' table because 'forum_thread' table does not include content. 
  188. // Note: We can use 'text' for original text OR 'text_parsed' for pre-parsed text output 
  189. $this->field_map[] = array( 
  190. 'from_tablename' => 'forum_post_text',  
  191. 'from_fieldname' => 'text_parsed',  
  192. 'join_tablename' => 'forum_thread',  
  193. 'join_type' => 'LEFT',  
  194. 'join_expression' => 'ON forum_thread.start_id = forum_post_text.post_id',  
  195. 'to_type' => 'topic',  
  196. 'to_fieldname' => 'post_content',  
  197. 'callback_method' => 'callback_html' 
  198. ); 
  199.  
  200. // Topic title. 
  201. $this->field_map[] = array( 
  202. 'from_tablename' => 'forum_thread',  
  203. 'from_fieldname' => 'title',  
  204. 'to_type' => 'topic',  
  205. 'to_fieldname' => 'post_title' 
  206. ); 
  207.  
  208. // Topic slug (Clean name to avoid conflicts) 
  209. $this->field_map[] = array( 
  210. 'from_tablename' => 'forum_thread',  
  211. 'from_fieldname' => 'title_url',  
  212. 'to_type' => 'topic',  
  213. 'to_fieldname' => 'post_name',  
  214. 'callback_method' => 'callback_slug' 
  215. ); 
  216.  
  217. // Topic parent forum id (If no parent, then 0) 
  218. $this->field_map[] = array( 
  219. 'from_tablename' => 'forum_thread',  
  220. 'from_fieldname' => 'forum_id',  
  221. 'to_type' => 'topic',  
  222. 'to_fieldname' => 'post_parent',  
  223. 'callback_method' => 'callback_forumid' 
  224. ); 
  225.  
  226. // Topic status (Open or Closed, PHPFox v3.5.x 0=open & 1=closed) 
  227. $this->field_map[] = array( 
  228. 'from_tablename' => 'forum_thread',  
  229. 'from_fieldname' => 'is_closed',  
  230. 'to_type' => 'topic',  
  231. 'to_fieldname' => 'post_status',  
  232. 'callback_method' => 'callback_topic_status' 
  233. ); 
  234.  
  235. // Sticky status (Stored in postmeta)) 
  236. $this->field_map[] = array( 
  237. 'from_tablename' => 'forum_thread',  
  238. 'from_fieldname' => 'order_id',  
  239. 'to_type' => 'topic',  
  240. 'to_fieldname' => '_bbp_old_sticky_status',  
  241. 'callback_method' => 'callback_sticky_status' 
  242. ); 
  243.  
  244. // Topic dates. 
  245. $this->field_map[] = array( 
  246. 'from_tablename' => 'forum_thread',  
  247. 'from_fieldname' => 'time_stamp',  
  248. 'to_type' => 'topic',  
  249. 'to_fieldname' => 'post_date',  
  250. 'callback_method' => 'callback_datetime' 
  251. ); 
  252. $this->field_map[] = array( 
  253. 'from_tablename' => 'forum_thread',  
  254. 'from_fieldname' => 'time_stamp',  
  255. 'to_type' => 'topic',  
  256. 'to_fieldname' => 'post_date_gmt',  
  257. 'callback_method' => 'callback_datetime' 
  258. ); 
  259. $this->field_map[] = array( 
  260. 'from_tablename' => 'forum_thread',  
  261. 'from_fieldname' => 'time_update',  
  262. 'to_type' => 'topic',  
  263. 'to_fieldname' => 'post_modified',  
  264. 'callback_method' => 'callback_datetime' 
  265. ); 
  266. $this->field_map[] = array( 
  267. 'from_tablename' => 'forum_thread',  
  268. 'from_fieldname' => 'time_update',  
  269. 'to_type' => 'topic',  
  270. 'to_fieldname' => 'post_modified_gmt',  
  271. 'callback_method' => 'callback_datetime' 
  272. ); 
  273. $this->field_map[] = array( 
  274. 'from_tablename' => 'forum_thread',  
  275. 'from_fieldname' => 'time_update',  
  276. 'to_type' => 'topic',  
  277. 'to_fieldname' => '_bbp_last_active_time',  
  278. 'callback_method' => 'callback_datetime' 
  279. ); 
  280.  
  281. /** Tags Section ******************************************************/ 
  282.  
  283. // Topic id. 
  284. $this->field_map[] = array( 
  285. 'from_tablename' => 'tag',  
  286. 'from_fieldname' => 'item_id',  
  287. 'to_type' => 'tags',  
  288. 'to_fieldname' => 'objectid',  
  289. 'callback_method' => 'callback_topicid' 
  290. ); 
  291.  
  292. // Taxonomy ID. 
  293. $this->field_map[] = array( 
  294. 'from_tablename' => 'tag',  
  295. 'from_fieldname' => 'tag_id',  
  296. 'to_type' => 'tags',  
  297. 'to_fieldname' => 'taxonomy' 
  298. ); 
  299.  
  300. // Term text. 
  301. $this->field_map[] = array( 
  302. 'from_tablename' => 'tag',  
  303. 'from_fieldname' => 'tag_text',  
  304. 'to_type' => 'tags',  
  305. 'to_fieldname' => 'name' 
  306. ); 
  307.  
  308. // Term slug. 
  309. $this->field_map[] = array( 
  310. 'from_tablename' => 'tag',  
  311. 'from_fieldname' => 'tag_url',  
  312. 'to_type' => 'tags',  
  313. 'to_fieldname' => 'slug',  
  314. 'callback_method' => 'callback_slug' 
  315. ); 
  316.  
  317. /** Reply Section *****************************************************/ 
  318.  
  319. // Reply id (Stored in postmeta) 
  320. $this->field_map[] = array( 
  321. 'from_tablename' => 'forum_post',  
  322. 'from_fieldname' => 'post_id',  
  323. 'to_type' => 'reply',  
  324. 'to_fieldname' => '_bbp_post_id' 
  325. ); 
  326.  
  327. // Reply parent forum id (If no parent, then 0. Stored in postmeta) 
  328. $this->field_map[] = array( 
  329. 'from_tablename' => 'forum_thread',  
  330. 'from_fieldname' => 'forum_id',  
  331. 'join_tablename' => 'forum_post',  
  332. 'join_type' => 'LEFT',  
  333. 'join_expression' => 'USING (thread_id)',  
  334. 'to_type' => 'reply',  
  335. 'to_fieldname' => '_bbp_forum_id',  
  336. 'callback_method' => 'callback_topicid_to_forumid' 
  337. ); 
  338.  
  339. // Reply parent topic id (If no parent, then 0. Stored in postmeta) 
  340. $this->field_map[] = array( 
  341. 'from_tablename' => 'forum_post',  
  342. 'from_fieldname' => 'thread_id',  
  343. 'to_type' => 'reply',  
  344. 'to_fieldname' => '_bbp_topic_id',  
  345. 'callback_method' => 'callback_topicid' 
  346. ); 
  347.  
  348. // Reply author. 
  349. $this->field_map[] = array( 
  350. 'from_tablename' => 'forum_post',  
  351. 'from_fieldname' => 'user_id',  
  352. 'to_type' => 'reply',  
  353. 'to_fieldname' => 'post_author',  
  354. 'callback_method' => 'callback_userid' 
  355. ); 
  356.  
  357. // Reply title. 
  358. $this->field_map[] = array( 
  359. 'from_tablename' => 'forum_thread',  
  360. 'from_fieldname' => 'title',  
  361. 'join_tablename' => 'forum_post',  
  362. 'join_type' => 'LEFT',  
  363. 'join_expression' => 'USING (thread_id)',  
  364. 'to_type' => 'reply',  
  365. 'to_fieldname' => 'post_title',  
  366. 'callback_method' => 'callback_reply_title' 
  367. ); 
  368.  
  369. // Reply slug (Clean name to avoid conflicts) 
  370. $this->field_map[] = array( 
  371. 'from_tablename' => 'forum_thread',  
  372. 'from_fieldname' => 'title_url',  
  373. 'join_tablename' => 'forum_post',  
  374. 'join_type' => 'LEFT',  
  375. 'join_expression' => 'USING (thread_id)',  
  376. 'to_type' => 'reply',  
  377. 'to_fieldname' => 'post_name',  
  378. 'callback_method' => 'callback_slug' 
  379. ); 
  380.  
  381. // Reply content. 
  382. // Note: We join the 'forum_post_text' table because 'forum_post' table does not include content. 
  383. // Note: We can use 'text' for original text OR 'text_parsed' for pre-parsed text output 
  384. $this->field_map[] = array( 
  385. 'from_tablename' => 'forum_post_text',  
  386. 'from_fieldname' => 'text_parsed',  
  387. 'join_tablename' => 'forum_post',  
  388. 'join_type' => 'LEFT',  
  389. 'join_expression' => 'ON forum_post_text.post_id = forum_post.post_id WHERE forum_thread.start_id != forum_post.post_id',  
  390. 'to_type' => 'reply',  
  391. 'to_fieldname' => 'post_content',  
  392. 'callback_method' => 'callback_html' 
  393. ); 
  394.  
  395. // Reply parent topic id (If no parent, then 0) 
  396. $this->field_map[] = array( 
  397. 'from_tablename' => 'forum_post',  
  398. 'from_fieldname' => 'thread_id',  
  399. 'to_type' => 'reply',  
  400. 'to_fieldname' => 'post_parent',  
  401. 'callback_method' => 'callback_topicid' 
  402. ); 
  403.  
  404. // Reply dates. 
  405. $this->field_map[] = array( 
  406. 'from_tablename' => 'forum_post',  
  407. 'from_fieldname' => 'time_stamp',  
  408. 'to_type' => 'reply',  
  409. 'to_fieldname' => 'post_date',  
  410. 'callback_method' => 'callback_datetime' 
  411. ); 
  412. $this->field_map[] = array( 
  413. 'from_tablename' => 'forum_post',  
  414. 'from_fieldname' => 'time_stamp',  
  415. 'to_type' => 'reply',  
  416. 'to_fieldname' => 'post_date_gmt',  
  417. 'callback_method' => 'callback_datetime' 
  418. ); 
  419. $this->field_map[] = array( 
  420. 'from_tablename' => 'forum_post',  
  421. 'from_fieldname' => 'time_stamp',  
  422. 'to_type' => 'reply',  
  423. 'to_fieldname' => 'post_modified',  
  424. 'callback_method' => 'callback_datetime' 
  425. ); 
  426. $this->field_map[] = array( 
  427. 'from_tablename' => 'forum_post',  
  428. 'from_fieldname' => 'time_stamp',  
  429. 'to_type' => 'reply',  
  430. 'to_fieldname' => 'post_modified_gmt',  
  431. 'callback_method' => 'callback_datetime' 
  432. ); 
  433.  
  434. /** User Section ******************************************************/ 
  435.  
  436. // Store old User id (Stored in usermeta) 
  437. $this->field_map[] = array( 
  438. 'from_tablename' => 'user',  
  439. 'from_fieldname' => 'user_id',  
  440. 'to_type' => 'user',  
  441. 'to_fieldname' => '_bbp_user_id' 
  442. ); 
  443.  
  444. // Store old User password (Stored in usermeta serialized with salt) 
  445. $this->field_map[] = array( 
  446. 'from_tablename' => 'user',  
  447. 'from_fieldname' => 'password',  
  448. 'to_type' => 'user',  
  449. 'to_fieldname' => '_bbp_password',  
  450. 'callback_method' => 'callback_savepass' 
  451. ); 
  452.  
  453. // Store old User Salt (This is only used for the SELECT row info for the above password save) 
  454. $this->field_map[] = array( 
  455. 'from_tablename' => 'user',  
  456. 'from_fieldname' => 'password_salt',  
  457. 'to_type' => 'user',  
  458. 'to_fieldname' => '' 
  459. ); 
  460.  
  461. // User password verify class (Stored in usermeta for verifying password) 
  462. $this->field_map[] = array( 
  463. 'to_type' => 'user',  
  464. 'to_fieldname' => '_bbp_class',  
  465. 'default' => 'PHPFox3' 
  466. ); 
  467.  
  468. // User name. 
  469. $this->field_map[] = array( 
  470. 'from_tablename' => 'user',  
  471. 'from_fieldname' => 'user_name',  
  472. 'to_type' => 'user',  
  473. 'to_fieldname' => 'user_login' 
  474. ); 
  475.  
  476. // User nice name. 
  477. $this->field_map[] = array( 
  478. 'from_tablename' => 'user',  
  479. 'from_fieldname' => 'user_name',  
  480. 'to_type' => 'user',  
  481. 'to_fieldname' => 'user_nicename' 
  482. ); 
  483.  
  484. // User email. 
  485. $this->field_map[] = array( 
  486. 'from_tablename' => 'user',  
  487. 'from_fieldname' => 'email',  
  488. 'to_type' => 'user',  
  489. 'to_fieldname' => 'user_email' 
  490. ); 
  491.  
  492. // User registered. 
  493. $this->field_map[] = array( 
  494. 'from_tablename' => 'user',  
  495. 'from_fieldname' => 'joined',  
  496. 'to_type' => 'user',  
  497. 'to_fieldname' => 'user_registered',  
  498. 'callback_method' => 'callback_datetime' 
  499. ); 
  500.  
  501. // User display name. 
  502. $this->field_map[] = array( 
  503. 'from_tablename' => 'user',  
  504. 'from_fieldname' => 'full_name',  
  505. 'to_type' => 'user',  
  506. 'to_fieldname' => 'display_name' 
  507. ); 
  508.  
  509.  
  510. /** 
  511. * This method allows us to indicates what is or is not converted for each 
  512. * converter. 
  513. */ 
  514. public function info() 
  515. return ''; 
  516.  
  517. /** 
  518. * This method is to save the salt and password together. That 
  519. * way when we authenticate it we can get it out of the database 
  520. * as one value. Array values are auto sanitized by WordPress. 
  521. */ 
  522. public function callback_savepass( $field, $row ) 
  523. $pass_array = array( 'hash' => $field, 'salt' => $row['salt'] ); 
  524. return $pass_array; 
  525.  
  526. /** 
  527. * This method is to take the pass out of the database and compare 
  528. * to a pass the user has typed in. 
  529. */ 
  530. public function authenticate_pass( $password, $serialized_pass ) 
  531. $pass_array = unserialize( $serialized_pass ); 
  532. return ( $pass_array['hash'] == md5( md5( $password ). $pass_array['salt'] ) ); 
  533.  
  534. /** 
  535. * Translate the forum type from PHPFox v3.5.x numeric's to WordPress's strings. 
  536. * @param int $status PHPFox v3.5.x numeric forum type 
  537. * @return string WordPress safe 
  538. */ 
  539. public function callback_forum_type( $status = 0 ) { 
  540. switch ( $status ) { 
  541. case 1 : 
  542. $status = 'category'; 
  543. break; 
  544.  
  545. case 0 : 
  546. default : 
  547. $status = 'forum'; 
  548. break; 
  549. return $status; 
  550.  
  551. /** 
  552. * Translate the forum status from PHPFox v3.5.x numeric's to WordPress's strings. 
  553. * @param int $status PHPFox v3.5.x numeric forum status 
  554. * @return string WordPress safe 
  555. */ 
  556. public function callback_forum_status( $status = 0 ) { 
  557. switch ( $status ) { 
  558. case 1 : 
  559. $status = 'closed'; 
  560. break; 
  561.  
  562. case 0 : 
  563. default : 
  564. $status = 'open'; 
  565. break; 
  566. return $status; 
  567.  
  568. /** 
  569. * Translate the post status from PHPFox v3.5.x numeric's to WordPress's strings. 
  570. * @param int $status PHPFox v3.5.x numeric topic status 
  571. * @return string WordPress safe 
  572. */ 
  573. public function callback_topic_status( $status = 0 ) { 
  574. switch ( $status ) { 
  575. case 1 : 
  576. $status = 'closed'; 
  577. break; 
  578.  
  579. case 0 : 
  580. default : 
  581. $status = 'publish'; 
  582. break; 
  583. return $status; 
  584.  
  585. /** 
  586. * Translate the topic sticky status type from PHPFox v3.5.x numeric's to WordPress's strings. 
  587. * @param int $status PHPFox v3.5.x numeric forum type 
  588. * @return string WordPress safe 
  589. */ 
  590. public function callback_sticky_status( $status = 0 ) { 
  591. switch ( $status ) { 
  592. case 1 : 
  593. $status = 'sticky'; // PHPFox Sticky 'topic_sticky = 1' 
  594. break; 
  595.  
  596. case 0 : 
  597. default : 
  598. $status = 'normal'; // PHPFox Normal Topic 'topic_sticky = 0' 
  599. break; 
  600. return $status; 
  601.  
  602. /** 
  603. * Verify the topic/reply count. 
  604. * @param int $count PHPFox v3.5.x topic/reply counts 
  605. * @return string WordPress safe 
  606. */ 
  607. public function callback_topic_reply_count( $count = 1 ) { 
  608. $count = absint( (int) $count - 1 ); 
  609. return $count; 
  610.  
  611. /** 
  612. * Set the reply title 
  613. * @param string $title PHPFox v3.5.x topic title of this reply 
  614. * @return string Prefixed topic title, or empty string 
  615. */ 
  616. public function callback_reply_title( $title = '' ) { 
  617. $title = !empty( $title ) ? __( 'Re: ', 'bbpress' ) . html_entity_decode( $title ) : ''; 
  618. return $title;