/** * Ngfb Constructor * * Uses NgfbConfig's static methods to read configuration * values into the $cf array, define constants, and require * essential library files. Instantiates the NgfbRegister * class, to register the activation / deactivation / uninstall * hooks, along with adding the wpmu_new_blog and * wpmu_activate_blog action hooks. * * set_config() is hooked into 'init' at -1 to allow other * plugins to extend the $cf array as early as possible. * * @access public * @return Ngfb */ public function __construct() { require_once dirname(__FILE__) . '/lib/config.php'; require_once dirname(__FILE__) . '/lib/register.php'; $this->cf = NgfbConfig::get_config(); NgfbConfig::set_constants(__FILE__); NgfbConfig::require_libs(__FILE__); $classname = __CLASS__ . 'Register'; $this->reg = new $classname($this); add_action('init', array(&$this, 'set_config'), -1); add_action('init', array(&$this, 'init_plugin'), NGFB_INIT_PRIORITY); add_action('widgets_init', array(&$this, 'init_widgets'), 10); }
/** * Ngfb Constructor */ public function __construct() { require_once dirname(__FILE__) . '/lib/config.php'; $this->cf = NgfbConfig::get_config(); // unfiltered - $cf['*'] array is not available yet NgfbConfig::set_constants(__FILE__); NgfbConfig::require_libs(__FILE__); // includes the register.php class library $this->reg = new NgfbRegister($this); // activate, deactivate, uninstall hooks add_action('init', array(&$this, 'set_config'), -1); add_action('init', array(&$this, 'init_plugin'), NGFB_INIT_PRIORITY); add_action('widgets_init', array(&$this, 'init_widgets'), 10); }