BP_Registration_Options

Does all the actual loading.

Defined (1)

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

/bp-registration-options.php  
  1. class BP_Registration_Options { 
  2.  
  3. /** 
  4. * Current version. 
  5. * @since unknown 
  6. * @var string 
  7. */ 
  8. public $version = ''; 
  9.  
  10. /** 
  11. * Plugin basename. 
  12. * @since unknown 
  13. * @var string 
  14. */ 
  15. public $basename = ''; 
  16.  
  17. /** 
  18. * Plugin directory server path. 
  19. * @since unknown 
  20. * @var string 
  21. */ 
  22. public $directory_path = ''; 
  23.  
  24. /** 
  25. * Piece it all together 
  26. */ 
  27. function __construct() { 
  28. // Define plugin constants. 
  29. $this->version = BP_REGISTRATION_OPTIONS_VERSION; 
  30. $this->basename = plugin_basename( __FILE__ ); 
  31. $this->directory_path = plugin_dir_path( __FILE__ ); 
  32.  
  33. register_activation_hook( __FILE__, array( &$this, 'activate' ) ); 
  34. register_deactivation_hook( __FILE__, array( &$this, 'deactivate' ) ); 
  35.  
  36. require_once( $this->directory_path . 'includes/utility.php' ); 
  37. require_once( $this->directory_path . 'includes/admin.php' ); 
  38. require_once( $this->directory_path . 'includes/core.php' ); 
  39. require_once( $this->directory_path . 'includes/compatibility.php' ); 
  40.  
  41. add_action( 'init', array( $this, 'load_textdomain' ) ); 
  42.  
  43. /** 
  44. * Activation hook for the plugin. 
  45. */ 
  46. function activate() { 
  47. // Verify user is running WP 3.0 or newer. 
  48. if ( version_compare( get_bloginfo( 'version' ), '3.0', '<' ) ) { 
  49. deactivate_plugins( plugin_basename( __FILE__ ) ); 
  50. wp_die( esc_html__( 'This plugin requires WordPress version 3.0 or higher.', 'bp-registration-options' ) ); 
  51. flush_rewrite_rules(); 
  52.  
  53. /** 
  54. * Deactivation hook for the plugin. 
  55. */ 
  56. function deactivate() { 
  57. flush_rewrite_rules(); 
  58.  
  59. /** 
  60. * Load our textdomain 
  61. */ 
  62. function load_textdomain() { 
  63. load_plugin_textdomain( 'bp-registration-options', false, basename( dirname( __FILE__ ) ) . '/languages/' );