| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | -* | |
| 3 | +* | |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | 6 | // Disallow direct access. |
| 7 | 7 | defined('ABSPATH') or die("Access denied"); |
| @@ -6,15 +6,15 @@ | ||
| 6 | 6 | // Disallow direct access. |
| 7 | 7 | defined('ABSPATH') or die("Access denied"); |
| 8 | 8 | |
| 9 | 9 | /** |
| 10 | -* | |
| 10 | +* | |
| 11 | 11 | */ |
| 12 | 12 | class CJTPackagesAccessPoint extends CJTPageAccessPoint { |
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | 15 | * put your comment there... |
| 16 | - * | |
| 16 | + * | |
| 17 | 17 | */ |
| 18 | 18 | public function __construct() { |
| 19 | 19 | // Initialize Access Point base! |
| 20 | 20 | parent::__construct(); |
| @@ -23,9 +23,9 @@ | ||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * put your comment there... |
| 27 | - * | |
| 27 | + * | |
| 28 | 28 | */ |
| 29 | 29 | protected function doListen() { |
| 30 | 30 | // Only if permitted! |
| 31 | 31 | if ($this->hasAccess()) { |
| @@ -32,30 +32,30 @@ | ||
| 32 | 32 | // Add menu page. |
| 33 | 33 | add_action('admin_menu', array(&$this, 'menu'), 11); |
| 34 | 34 | } |
| 35 | 35 | } |
| 36 | - | |
| 36 | + | |
| 37 | 37 | /** |
| 38 | 38 | * put your comment there... |
| 39 | - * | |
| 39 | + * | |
| 40 | 40 | */ |
| 41 | 41 | public function menu() { |
| 42 | 42 | // Setup Page. |
| 43 | - // $pageHookId = add_submenu_page( | |
| 44 | - // CJTPlugin::PLUGIN_REQUEST_ID, | |
| 45 | - // cssJSToolbox::getText('CJT Manage - Packages'), | |
| 46 | - // cssJSToolbox::getText('Packages'), | |
| 47 | - // 'administrator', | |
| 48 | - // CJTPlugin::PLUGIN_REQUEST_ID . '-packages', | |
| 49 | - // array(&$this->controller, '_doAction') | |
| 50 | - // ); | |
| 51 | - // // Process when its installed!! | |
| 52 | - // add_action("load-{$pageHookId}", array($this, 'getPage')); | |
| 43 | + $pageHookId = add_submenu_page( | |
| 44 | + CJTPlugin::PLUGIN_REQUEST_ID, | |
| 45 | + cssJSToolbox::getText('CJT Manage - Packages'), | |
| 46 | + cssJSToolbox::getText('Packages'), | |
| 47 | + 'administrator', | |
| 48 | + CJTPlugin::PLUGIN_REQUEST_ID . '-packages', | |
| 49 | + array(&$this->controller, '_doAction') | |
| 50 | + ); | |
| 51 | + // Process when its installed!! | |
| 52 | + add_action("load-{$pageHookId}", array($this, 'getPage')); | |
| 53 | 53 | } |
| 54 | - | |
| 54 | + | |
| 55 | 55 | /** |
| 56 | 56 | * put your comment there... |
| 57 | - * | |
| 57 | + * | |
| 58 | 58 | */ |
| 59 | 59 | public function route($loadView = null, $request = array('view' => 'packages/manager')) { |
| 60 | 60 | // Load package manager view through the default controller. |
| 61 | 61 | $this->controllerName = 'default'; |
| @@ -63,9 +63,9 @@ | ||
| 63 | 63 | parent::route($loadView, $request) |
| 64 | 64 | // Fire 'display' action. |
| 65 | 65 | ->setAction('display'); |
| 66 | 66 | } |
| 67 | - | |
| 67 | + | |
| 68 | 68 | } // End class. |
| 69 | 69 | |
| 70 | 70 | // Hookable! |
| 71 | 71 | CJTPackagesAccessPoint::define('CJTPackagesAccessPoint', array('hookType' => CJTWordpressEvents::HOOK_FILTER)); |