PluginProbe
CSS & JavaScript Toolbox / 8.3.2
CSS & JavaScript Toolbox v8.3.2
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
← All changes | access.points/main.accesspoint.php +47 -22 108.3.2 View file →
@@ -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 CJTMainAccessPoint extends CJTAccessPoint {
13 13
14 14 /**
15 15 * put your comment there...
16 - *
16 + *
17 17 * @var mixed
18 18 */
19 19 protected static $instance;
20 20
@@ -19,9 +19,9 @@
19 19 protected static $instance;
20 20
21 21 /**
22 22 * put your comment there...
23 - *
23 + *
24 24 */
25 25 public function __construct() {
26 26 // Initialize Access Point base!
27 27 parent::__construct();
@@ -32,20 +32,43 @@
32 32 }
33 33
34 34 /**
35 35 * put your comment there...
36 - *
36 + *
37 37 */
38 - protected function doListen()
38 + public function _OnCJTDeadNotice()
39 39 {
40 -
40 + require CJTOOLBOX_PATH . DIRECTORY_SEPARATOR . 'includes' .
41 + DIRECTORY_SEPARATOR . 'html' .
42 + DIRECTORY_SEPARATOR . 'CJTDeadNotice.html.php';
43 + }
44 +
45 + /**
46 + * put your comment there...
47 + *
48 + */
49 + public function _OnDismissCJTDeadNotice()
50 + {
51 +
52 + update_option('cjt-dead-notice-dismissed', true);
53 +
54 + die();
55 + }
56 +
57 + /**
58 + * put your comment there...
59 + *
60 + */
61 + protected function doListen()
62 + {
63 +
41 64 // Register uninstall hook!
42 65 if (CJTPlugin::getInstance()->isInstalled())
43 66 {
44 67 // Wordpress need STATIC method!
45 - register_uninstall_hook(CJTOOLBOX_PLUGIN_FILE, array(__CLASS__, 'uninstall'));
68 + register_uninstall_hook(CJTOOLBOX_PLUGIN_FILE, array(__CLASS__, 'uninstall'));
46 69 }
47 -
70 +
48 71 // If not in uninstall state then plugins_loaded hook
49 72 // used to run the plugin!
50 73 add_action('plugins_loaded', array(&$this, 'main'));
51 74 }
@@ -51,13 +74,23 @@
51 74 }
52 75
53 76 /**
54 77 * put your comment there...
55 - *
78 + *
56 79 */
57 - public function main()
80 + public function main()
58 81 {
82 +
83 + if (!get_option('cjt-dead-notice-dismissed'))
84 + {
85 +
86 + add_action('wp_ajax_cjt-dead-notice', array($this, '_OnDismissCJTDeadNotice'));
87 +
88 + add_action('admin_notices', array($this, '_OnCJTDeadNotice'));
89 + add_action('network_admin_notices', array($this, '_OnCJTDeadNotice'));
90 + }
59 91
92 +
60 93 // Run the coupling only if installed!
61 94 if (CJTPlugin::getInstance()->isInstalled())
62 95 {
63 96 $this->controllerName = 'blocks-coupling';
@@ -62,9 +95,9 @@
62 95 {
63 96 $this->controllerName = 'blocks-coupling';
64 97 $this->route(false);
65 98 }
66 -
99 +
67 100 // Run all the aother access points!
68 101 CJTPlugin::getInstance()->listen();
69 102 }
70 103
@@ -69,19 +102,13 @@
69 102 }
70 103
71 104 /**
72 105 * put your comment there...
73 - *
106 + *
74 107 */
75 108 public static function uninstall() {
76 109 // For the uninstaller to be run eraseData setting must be enabled.
77 110 cssJSToolbox::import('models:settings:uninstall.php');
78 - cssJSToolbox::import('models:installer.php');
79 -
80 - delete_option( CJTPlugin::DB_VERSION_OPTION_NAME );
81 - delete_option( CJTInstallerModel::INSTALLATION_STATE );
82 - delete_option( 'cjtplusinstaller' );
83 -
84 111 $settings = new CJTSettingsUninstallPage();
85 112 if ($settings->eraseData) {
86 113 // Get the only instance we've for the main access point!
87 114 $mainAccessPointObject = self::$instance;
@@ -89,11 +116,9 @@
89 116 $mainAccessPointObject->controllerName = 'default';
90 117 $controller = $mainAccessPointObject->route(false)
91 118 // Fire uninstall action!
92 119 ->setAction('uninstall')
93 - ->_doAction();
94 -
95 -
120 + ->_doAction();
96 121 }
97 122 }
98 123
99 124 } // End class.