| @@ -27,9 +27,9 @@ | ||
| 27 | 27 | * |
| 28 | 28 | */ |
| 29 | 29 | protected function doListen() { |
| 30 | 30 | // Define CJT AJAX access point! |
| 31 | - add_action("wp_ajax_{$this->pageId}_api", array(&$this, 'route')); | |
| 31 | + add_action("wp_ajax_{$this->pageId}_api", array(&$this, 'route'), 10, 0); | |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * put your comment there... |
| @@ -34,9 +34,9 @@ | ||
| 34 | 34 | /** |
| 35 | 35 | * put your comment there... |
| 36 | 36 | * |
| 37 | 37 | */ |
| 38 | - public function route() { | |
| 38 | + public function route($loadView = null, $request = null) { | |
| 39 | 39 | // Initializing! |
| 40 | 40 | $controller = false; |
| 41 | 41 | // Controllers allowed to be Loaded if not installed |
| 42 | 42 | $notInstalledAllowedControllers = array('installer', 'setup'); |
| @@ -44,9 +44,9 @@ | ||
| 44 | 44 | if (CJTPlugin::getInstance()->isInstalled() || in_array($this->controllerName, $notInstalledAllowedControllers)) { |
| 45 | 45 | // Connected! |
| 46 | 46 | $this->connected(); |
| 47 | 47 | // Instantiate controller. |
| 48 | - $controller = parent::route(); | |
| 48 | + $controller = parent::route($loadView, $request); | |
| 49 | 49 | // Dispatch the call as its originally requested from ajax action! |
| 50 | 50 | $action = "wp_ajax_{$this->pageId}_{$_REQUEST['CJTAjaxAction']}"; |
| 51 | 51 | // Fire Ajax action. |
| 52 | 52 | do_action($action); |