public function __construct() { /** check the admin condition */ if (!is_admin()) { return; } /* get the name of the current class */ $this->name = get_class($this); /* create the model and view instances */ $this->model = ABH_Classes_ObjController::getModel($this->name); }
public function __construct() { /* Load error class */ ABH_Classes_ObjController::getController('ABH_Classes_Error'); /* Load Tools */ ABH_Classes_ObjController::getController('ABH_Classes_Tools'); /* get the name of the current class */ $this->name = get_class($this); /* load the model and hooks here for wordpress actions to take efect */ /* create the model and view instances */ $this->model = ABH_Classes_ObjController::getModel($this->name); //IMPORTANT TO LOAD HOOKS HERE /* check if there is a hook defined in the controller clients class */ ABH_Classes_ObjController::getController('ABH_Classes_HookController')->setHooks($this); ABH_Classes_ObjController::getController('ABH_Classes_HookController')->getShortcodes($this); }