PluginProbe
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel / 1.0
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel v1.0
1.7.1 1.7.0 1.6.0 1.5.2 trunk 0.1 0.2.0 0.2.1 0.3 0.3.1 0.3.2 0.3.3 0.3.4 0.4 0.4.1 0.4.2 0.4.3 1.0 1.1 1.2 1.3.1 1.4.0 1.4.1 1.5.0 1.5.1 All 26 releases
← All changes | flywp.php +26 -24 1.5.01.0 View file →
@@ -2,9 +2,9 @@
2 2 /**
3 3 * Plugin Name: FlyWP
4 4 * Plugin URI: https://flywp.com
5 5 * Description: Helper plugin for FlyWP
6 - * Version: 1.5.0
6 + * Version: 1.0
7 7 * Author: FlyWP
8 8 * Author URI: https://flywp.com/?utm_source=wporg&utm_medium=banner&utm_campaign=author-uri
9 9 * License: GPL2
10 10 */
@@ -40,9 +40,9 @@
40 40 * Plugin version.
41 41 *
42 42 * @var string
43 43 */
44 - public $version = '1.5.0';
44 + public $version = '1.0';
45 45
46 46 /**
47 47 * Plugin Constructor.
48 48 *
@@ -52,9 +52,8 @@
52 52 $this->define_constants();
53 53
54 54 $this->add_action( 'plugins_loaded', 'init_plugin' );
55 55 register_activation_hook( __FILE__, [ $this, 'activate' ] );
56 - register_deactivation_hook( __FILE__, [ $this, 'deactivate' ] );
57 56 }
58 57
59 58 /**
60 59 * Define plugin constants.
@@ -85,20 +84,8 @@
85 84 flush_rewrite_rules( false );
86 85 }
87 86
88 87 /**
89 - * Plugin deactivation hook.
90 - *
91 - * @return void
92 - */
93 - public function deactivate() {
94 - $timestamp = wp_next_scheduled( FlyWP\Api\UpdatesData::CRON_HOOK );
95 - if ( $timestamp ) {
96 - wp_unschedule_event( $timestamp, FlyWP\Api\UpdatesData::CRON_HOOK );
97 - }
98 - }
99 -
100 - /**
101 88 * Initialize plugin.
102 89 *
103 90 * @return void
104 91 */
@@ -114,17 +101,14 @@
114 101 } else {
115 102 $this->frontend = new FlyWP\Frontend();
116 103 }
117 104
118 - $this->router = new FlyWP\Router();
119 - $this->rest = new FlyWP\Api();
120 - $this->fastcgi = new FlyWP\Fastcgi_Cache();
121 - $this->opcache = new FlyWP\Opcache();
122 - $this->flyapi = new FlyWP\FlyApi();
123 - $this->email = new FlyWP\Email();
124 - $this->optimize = new FlyWP\Optimizations();
125 - $this->litespeed = new FlyWP\Litespeed();
126 - $this->updates_data = new FlyWP\Api\UpdatesData();
105 + $this->router = new FlyWP\Router();
106 + $this->rest = new FlyWP\Api();
107 + $this->fastcgi = new FlyWP\Fastcgi_Cache();
108 + $this->opcache = new FlyWP\Opcache();
109 + $this->flyapi = new FlyWP\FlyApi();
110 + $this->email = new FlyWP\Email();
127 111 }
128 112
129 113 /**
130 114 * Show admin notice if API key is not set.
@@ -152,8 +136,26 @@
152 136 * @return string
153 137 */
154 138 public function get_key() {
155 139 return FLYWP_API_KEY;
140 + }
141 +
142 + /**
143 + * Debugging helper.
144 + *
145 + * @param mixed $value
146 + * @param bool $die
147 + *
148 + * @return void
149 + */
150 + public function debug( $value, $die = false ) {
151 + echo '<pre>';
152 + print_r( $value );
153 + echo '</pre>';
154 +
155 + if ( $die ) {
156 + die();
157 + }
156 158 }
157 159 }
158 160
159 161 /**