[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

/gp-includes/ -> class.bp-options.php (source)

   1  <?php
   2  /**
   3   * BP_Options allows storage of options for BackPress
   4   * in the GlotPress/bbPress database
   5   */
   6  
   7  class BP_Options
   8  {
   9  	function prefix() {
  10          return 'bp_glotpress_';
  11      }
  12      
  13  	function get($option) {
  14          switch ($option) {
  15              case 'application_id':
  16                  return 'glotpress';
  17                  break;
  18              case 'application_uri':
  19                  return gp_url();
  20                  break;
  21              case 'cron_uri':
  22                  return '';
  23                  break;
  24              case 'cron_check':
  25                  return '';
  26                  break;
  27              case 'charset':
  28                  return 'UTF-8';
  29                  break;
  30              case 'wp_http_version':
  31                  return 'GlotPress/' . gp_get_option('version');
  32                  break;
  33              case 'hash_function_name':
  34                  return 'gp_hash';
  35                  break;
  36              default:
  37                  return gp_get_option(BP_Options::prefix() . $option);
  38                  break;
  39          }
  40      }
  41      
  42  	function add($option, $value) {
  43          return BP_Options::update($option, $value);
  44      }
  45      
  46  	function update($option, $value) {
  47          return bb_update_option(BP_Options::prefix() . $option, $value);
  48      }
  49      
  50  	function delete($option) {
  51          return bb_delete_option(BP_Options::prefix() . $option);
  52      }
  53  } // END class BP_Options


Generated: Thu May 24 03:59:35 2012 Hosted by follow the white rabbit.