/** * Determine in which mode we are and initialize the right dedicated controller. * * @since 2.0 */ public function on_init() { if (is_admin()) { if (defined('DOING_AJAX')) { Types_Ajax::initialize(); } else { Types_Admin::initialize(); } } else { Types_Frontend::initialize(); } }
/** * Determine in which mode we are and initialize the right dedicated controller. * * @since 2.0 */ public function on_init() { if (is_admin()) { if (defined('DOING_AJAX')) { $this->mode = self::MODE_AJAX; Types_Ajax::initialize(); } else { $this->mode = self::MODE_ADMIN; Types_Admin::initialize(); } } else { $this->mode = self::MODE_FRONTEND; Types_Frontend::initialize(); } }