BP_Options

BP_Options allows storage of options for BackPress in the bbPress database.

Defined (1)

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

/bp-forums/bbpress/bb-includes/class.bp-options.php  
  1. class BP_Options 
  2. function prefix() 
  3. return 'bp_bbpress_'; 
  4.  
  5. function get( $option ) 
  6. switch ( $option ) { 
  7. case 'application_id': 
  8. return bb_get_option( 'site_id' ); 
  9. break; 
  10. case 'application_uri': 
  11. return bb_get_uri( null, null, BB_URI_CONTEXT_NONE ); 
  12. break; 
  13. case 'cron_uri': 
  14. return bb_get_uri( 'bb-cron.php', array( 'check' => BP_Options::get( 'cron_check' ) ), BB_URI_CONTEXT_WP_HTTP_REQUEST ); 
  15. break; 
  16. case 'wp_http_version': 
  17. return 'bbPress/' . bb_get_option( 'version' ); 
  18. break; 
  19. case 'hash_function_name': 
  20. return 'bb_hash'; 
  21. break; 
  22. case 'language_locale': 
  23. return bb_get_locale(); 
  24. break; 
  25. case 'language_directory': 
  26. return BB_LANG_DIR; 
  27. break; 
  28. case 'charset': 
  29. case 'gmt_offset': 
  30. case 'timezone_string': 
  31. return bb_get_option( $option ); 
  32. break; 
  33. default: 
  34. return bb_get_option( BP_Options::prefix() . $option ); 
  35. break; 
  36.  
  37. function add( $option, $value ) 
  38. return BP_Options::update( $option, $value ); 
  39.  
  40. function update( $option, $value ) 
  41. return bb_update_option( BP_Options::prefix() . $option, $value ); 
  42.  
  43. function delete( $option ) 
  44. return bb_delete_option( BP_Options::prefix() . $option ); 
  45. } // END class BP_Options