bb_export_forum

The BuddyPress bb export forum function.

Description

bb_export_forum( $forum_id ); 

Parameters (1)

0. $forum_id
The forum id.

Usage

  1. if ( !function_exists( 'bb_export_forum' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-admin/export.php'; 
  3.  
  4. // The forum id. 
  5. $forum_id = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bb_export_forum($forum_id); 
  9.  

Defined (1)

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

/bp-forums/bbpress/bb-admin/export.php  
  1. function bb_export_forum( $forum_id ) { 
  2. if ( !$_forum = bb_get_forum( $forum_id ) ) 
  3. return; 
  4.  
  5. $_forum = get_object_vars( $_forum ); 
  6.  
  7. $translate = array( 
  8. 'forum_name' => '!title',  
  9. 'forum_desc' => '?!content',  
  10. 'forum_parent' => '?parent' 
  11. ); 
  12.  
  13. $forum = _bb_translate_for_export( $translate, $_forum ); 
  14.  
  15. return _bb_export_object( array('type' => 'forum', 'id' => $_forum['forum_id']), $forum );