bp_forums_configure_existing_install

The BuddyPress bp forums configure existing install function.

Description

bp_forums_configure_existing_install(); 

Usage

  1. if ( !function_exists( 'bp_forums_configure_existing_install' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/deprecated/1.7.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_forums_configure_existing_install(); 
  7.  

Defined (1)

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

/bp-forums/deprecated/1.7.php  
  1. function bp_forums_configure_existing_install() { 
  2. global $wpdb, $bbdb; 
  3.  
  4. check_admin_referer( 'bp_forums_existing_install_init' ); 
  5.  
  6. // Sanitize $_REQUEST['bbconfigloc']. 
  7. $_REQUEST['bbconfigloc'] = apply_filters( 'bp_forums_bbconfig_location', $_REQUEST['bbconfigloc'] ); 
  8.  
  9. if ( false === strpos( $_REQUEST['bbconfigloc'], 'bb-config.php' ) ) { 
  10. if ( '/' != substr( $_REQUEST['bbconfigloc'], -1, 1 ) ) 
  11. $_REQUEST['bbconfigloc'] .= '/'; 
  12.  
  13. $_REQUEST['bbconfigloc'] .= 'bb-config.php'; 
  14.  
  15. bp_update_option( 'bb-config-location', $_REQUEST['bbconfigloc'] ); 
  16.  
  17. if ( !file_exists( $_REQUEST['bbconfigloc'] ) ) { 
  18. return false; 
  19.  
  20. return true;