/** * Register the options page. */ public function register() { // This is the initial activation, save the defaults to the db if (!$this->options->exists()) { $this->reset(); } // Only preprocess if this is the currently viewed page if ($this->page->get_slug() == filter_input(INPUT_GET, 'page')) { $this->preprocess(); } $this->page->register(); $this->set_global_variable(); $this->do_action('afw_options_init'); }