/** * Run init functionality * * @see init() hook * @return void */ public function init() { $this->set_options(); $this->_posts_helper = new MangaPress_Posts(); $this->_admin_helper = new MangaPress_Admin(); $this->_options_helper = new MangaPress_Options(); $this->flashmessages_helper = new MangaPress_FlashMessages(array('transient_name' => 'mangapress_messages')); $this->_load_current_options(); add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts')); add_filter('single_template', 'mangapress_single_comic_template'); add_filter('template_include', 'mangapress_latestcomic_template'); add_filter('template_include', 'mangapress_latestcomic_page_template'); add_filter('template_include', 'mangapress_comicarchive_template'); add_filter('template_include', 'mangapress_comicarchive_page_template'); if (get_option('mangapress_upgrade') == 'yes') { MangaPress_Install::get_instance()->do_upgrade(); } }