PluginProbe
FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager / 10
FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager v10
10.56 1.2.1 10 10.1 10.2 10.3 10.31 10.32 10.33 10.34 10.50 10.51 10.52 10.53 10.55 9.0 9.0.1 9.4 trunk 1.0.0 1.1 1.2
easy-code-manager / access.points / main.accesspoint.php

main.accesspoint.php in FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager 10, at access.points/main.accesspoint.php

85 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 *
4 */
5
6 // Disallow direct access.
7 defined('ABSPATH') or die("Access denied");
8
9 /**
10 *
11 */
12 class CJTMainAccessPoint extends CJTAccessPoint {
13
14 /**
15 * put your comment there...
16 *
17 * @var mixed
18 */
19 protected static $instance;
20
21 /**
22 * put your comment there...
23 *
24 */
25 public function __construct() {
26 // Initialize Access Point base!
27 parent::__construct();
28 // Set access point name!
29 $this->name = 'main';
30 // Needed for calling from nuinstall static method!
31 self::$instance = $this;
32 }
33
34 /**
35 * put your comment there...
36 *
37 */
38 protected function doListen() {
39 // Register uninstall hook!
40 if (CJTPlugin::getInstance()->isInstalled()) {
41 // Wordpress need STATIC method!
42 register_uninstall_hook(CJTOOLBOX_PLUGIN_FILE, array(__CLASS__, 'uninstall'));
43 }
44 // If not in uninstall state then plugins_loaded hook
45 // used to run the plugin!
46 add_action('plugins_loaded', array(&$this, 'main'));
47 }
48
49 /**
50 * put your comment there...
51 *
52 */
53 public function main() {
54 // Run the coupling only if installed!
55 if (CJTPlugin::getInstance()->isInstalled()) {
56 $this->controllerName = 'blocks-coupling';
57 $this->route(false);
58 }
59 // Run all the aother access points!
60 CJTPlugin::getInstance()->listen();
61 }
62
63 /**
64 * put your comment there...
65 *
66 */
67 public static function uninstall()
68 {
69
70 // Get the only instance we've for the main access point!
71 $mainAccessPointObject = self::$instance;
72
73 // Load default controller!
74 $mainAccessPointObject->controllerName = 'default';
75
76 $controller = $mainAccessPointObject->route(false)
77 // Fire uninstall action!
78 ->setAction('uninstall')
79 ->_doAction();
80 }
81
82 } // End class.
83
84 // Hookable!
85 CJTMainAccessPoint::define('CJTMainAccessPoint', array('hookType' => CJTWordpressEvents::HOOK_FILTER));