Changeset 3121638
- Timestamp:
- 07/18/2024 05:12:17 PM (19 months ago)
- Location:
- flywp
- Files:
-
- 8 added
- 10 deleted
- 26 edited
- 1 copied
-
tags/v1.3 (copied) (copied from flywp/trunk)
-
tags/v1.3/.php-cs-fixer.dist.php (deleted)
-
tags/v1.3/.prettierrc (deleted)
-
tags/v1.3/RELEASE.md (deleted)
-
tags/v1.3/flywp.php (modified) (4 diffs)
-
tags/v1.3/includes/Admin.php (modified) (4 diffs)
-
tags/v1.3/includes/Admin/Litespeed.php (added)
-
tags/v1.3/includes/Api.php (modified) (2 diffs)
-
tags/v1.3/includes/Api/Cache.php (added)
-
tags/v1.3/includes/Api/Fastcgi_Cache.php (deleted)
-
tags/v1.3/includes/FlyApi.php (modified) (1 diff)
-
tags/v1.3/includes/Helper.php (modified) (1 diff)
-
tags/v1.3/includes/LiteSpeed.php (added)
-
tags/v1.3/languages/flywp.pot (modified) (12 diffs)
-
tags/v1.3/readme.txt (modified) (2 diffs)
-
tags/v1.3/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
tags/v1.3/vendor/composer/autoload_static.php (modified) (1 diff)
-
tags/v1.3/vendor/composer/installed.php (modified) (2 diffs)
-
tags/v1.3/vendor/wedevs/wp-utils/.php-cs-fixer.dist.php (deleted)
-
tags/v1.3/views/admin.php (modified) (3 diffs)
-
tags/v1.3/views/litespeed.php (added)
-
tags/v1.3/views/op-cache.php (modified) (1 diff)
-
tags/v1.3/views/page-cache.php (modified) (2 diffs)
-
trunk/.php-cs-fixer.dist.php (deleted)
-
trunk/.prettierrc (deleted)
-
trunk/RELEASE.md (deleted)
-
trunk/flywp.php (modified) (4 diffs)
-
trunk/includes/Admin.php (modified) (4 diffs)
-
trunk/includes/Admin/Litespeed.php (added)
-
trunk/includes/Api.php (modified) (2 diffs)
-
trunk/includes/Api/Cache.php (added)
-
trunk/includes/Api/Fastcgi_Cache.php (deleted)
-
trunk/includes/FlyApi.php (modified) (1 diff)
-
trunk/includes/Helper.php (modified) (1 diff)
-
trunk/includes/LiteSpeed.php (added)
-
trunk/languages/flywp.pot (modified) (12 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_static.php (modified) (1 diff)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/vendor/wedevs/wp-utils/.php-cs-fixer.dist.php (deleted)
-
trunk/views/admin.php (modified) (3 diffs)
-
trunk/views/litespeed.php (added)
-
trunk/views/op-cache.php (modified) (1 diff)
-
trunk/views/page-cache.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
flywp/tags/v1.3/flywp.php
r3107616 r3121638 4 4 * Plugin URI: https://flywp.com 5 5 * Description: Helper plugin for FlyWP 6 * Version: 1. 26 * Version: 1.3 7 7 * Author: FlyWP 8 8 * Author URI: https://flywp.com/?utm_source=wporg&utm_medium=banner&utm_campaign=author-uri … … 42 42 * @var string 43 43 */ 44 public $version = '1. 2';44 public $version = '1.3'; 45 45 46 46 /** … … 103 103 } 104 104 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(); 111 $this->optimize = new FlyWP\Optimizations(); 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(); 111 $this->optimize = new FlyWP\Optimizations(); 112 $this->litespeed = new FlyWP\Litespeed(); 112 113 } 113 114 … … 140 141 return FLYWP_API_KEY; 141 142 } 142 143 /**144 * Debugging helper.145 *146 * @param mixed $value147 * @param bool $die148 *149 * @return void150 */151 public function debug( $value, $die = false ) {152 echo '<pre>';153 print_r( $value );154 echo '</pre>';155 156 if ( $die ) {157 die();158 }159 }160 143 } 161 144 -
flywp/tags/v1.3/includes/Admin.php
r3107616 r3121638 8 8 * Admin page slug. 9 9 */ 10 const PAGE_SLUG = 'flywp';10 public const PAGE_SLUG = 'flywp'; 11 11 12 12 /** … … 15 15 * @var string 16 16 */ 17 const SCREEN_NAME = 'dashboard_page_flywp';17 public const SCREEN_NAME = 'dashboard_page_flywp'; 18 18 19 public $fastcgi = null; 19 public $fastcgi = null; 20 public $litespeed = null; 20 21 21 22 /** … … 25 26 add_action( 'admin_menu', [ $this, 'register_admin_page' ] ); 26 27 27 $this->fastcgi = new Admin\Fastcgi_Cache(); 28 $this->fastcgi = new Admin\Fastcgi_Cache(); 29 $this->litespeed = new Admin\Litespeed(); 28 30 29 31 new Admin\Adminbar(); … … 101 103 ]; 102 104 105 // phpcs:ignore WordPress.Security.NonceVerification.Recommended 103 106 $active_tab = isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $tabs ) ? $_GET['tab'] : 'cache'; 104 107 $site_info = $this->fetch_site_info(); -
flywp/tags/v1.3/includes/Api.php
r3032189 r3121638 26 26 new Api\Themes(); 27 27 new Api\Updates(); 28 new Api\ Fastcgi_Cache();28 new Api\Cache(); 29 29 new Api\Health(); 30 30 } … … 53 53 } 54 54 55 $auth_header = $_SERVER['HTTP_AUTHORIZATION'];55 $auth_header = wp_unslash( $_SERVER['HTTP_AUTHORIZATION'] ); 56 56 57 57 if ( ! preg_match( '/Bearer\s(\S+)/', $auth_header, $matches ) ) { -
flywp/tags/v1.3/includes/FlyApi.php
r3007756 r3121638 21 21 * @return array|false 22 22 */ 23 public function cache_toggle( $action = 'enable' ) {23 public function cache_toggle( $action = 'enable', $type = 'fastcgi' ) { 24 24 return $this->post( 25 25 '/cache-toggle', 26 26 [ 27 27 'action' => $action, 28 'type' => $type, 28 29 ] 29 30 ); -
flywp/tags/v1.3/includes/Helper.php
r2925476 r3121638 25 25 die(); 26 26 } 27 28 /** 29 * Check if server is running Nginx. 30 * 31 * @return bool 32 */ 33 public static function is_nginx() { 34 return isset( $_SERVER['SERVER_SOFTWARE'] ) && false !== strpos( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ), 'nginx' ); 35 } 36 37 /** 38 * Check if server is running LiteSpeed. 39 * 40 * @return bool 41 */ 42 public static function is_litespeed() { 43 return isset( $_SERVER['SERVER_SOFTWARE'] ) && false !== strpos( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ), 'LiteSpeed' ); 44 } 27 45 } -
flywp/tags/v1.3/languages/flywp.pot
r3107616 r3121638 2 2 msgid "" 3 3 msgstr "" 4 "Project-Id-Version: FlyWP 1. 2\n"4 "Project-Id-Version: FlyWP 1.3\n" 5 5 "Report-Msgid-Bugs-To: https://github.com/flywp/flywp-helper/issues\n" 6 6 "Last-Translator: [email protected]\n" … … 9 9 "Content-Type: text/plain; charset=UTF-8\n" 10 10 "Content-Transfer-Encoding: 8bit\n" 11 "POT-Creation-Date: 2024-0 6-25T16:47:30+00:00\n"11 "POT-Creation-Date: 2024-07-18T16:21:08+00:00\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "X-Generator: WP-CLI 2.10.0\n" … … 17 17 #. Author of the plugin 18 18 #: flywp.php 19 #: includes/Admin.php:4 120 #: includes/Admin.php:4 219 #: includes/Admin.php:43 20 #: includes/Admin.php:44 21 21 #: includes/Admin/Adminbar.php:32 22 22 msgid "FlyWP" … … 38 38 msgstr "" 39 39 40 #: flywp.php:12 040 #: flywp.php:121 41 41 msgid "Missing FlyWP API key, plugin requires an API key." 42 42 msgstr "" 43 43 44 #: includes/Admin.php: 9844 #: includes/Admin.php:100 45 45 msgid "Caching" 46 46 msgstr "" 47 47 48 #: includes/Admin.php: 9948 #: includes/Admin.php:101 49 49 msgid "Email" 50 50 msgstr "" 51 51 52 #: includes/Admin.php:10 052 #: includes/Admin.php:102 53 53 msgid "Optimizations" 54 54 msgstr "" … … 68 68 #: includes/Admin/Adminbar.php:75 69 69 #: includes/Admin/Plugins.php:25 70 #: includes/LiteSpeed.php:69 70 71 #: views/page-cache.php:70 71 72 msgid "Settings" … … 256 257 msgstr "" 257 258 258 #: views/admin.php:10 259 #: includes/LiteSpeed.php:77 260 msgid "Activate Plugin" 261 msgstr "" 262 263 #: includes/LiteSpeed.php:86 264 msgid "Install Plugin" 265 msgstr "" 266 267 #: views/admin.php:15 259 268 msgid "FlyWP Dashboard" 260 269 msgstr "" … … 325 334 msgstr "" 326 335 327 #: views/op-cache.php:8 328 msgid "PHP OPcache has been cleared." 329 msgstr "" 330 331 #: views/op-cache.php:20 332 msgid "PHP OPcache" 333 msgstr "" 334 336 #: views/litespeed.php:6 337 #: views/page-cache.php:8 338 msgid "Page Caching has been enabled." 339 msgstr "" 340 341 #: views/litespeed.php:7 342 #: views/page-cache.php:9 343 msgid "Page Caching has been disabled." 344 msgstr "" 345 346 #: views/litespeed.php:19 347 msgid "LiteSpeed Cache" 348 msgstr "" 349 350 #: views/litespeed.php:25 335 351 #: views/op-cache.php:26 336 352 #: views/optimizations.php:11 … … 339 355 msgstr "" 340 356 357 #: views/litespeed.php:31 341 358 #: views/op-cache.php:32 342 359 #: views/optimizations.php:17 … … 345 362 msgstr "" 346 363 347 #: views/op-cache.php:44 348 msgid "OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request." 349 msgstr "" 350 351 #: views/op-cache.php:51 352 msgid "Hit Rate" 353 msgstr "" 354 355 #: views/op-cache.php:56 356 msgid "Cached Scripts" 357 msgstr "" 358 359 #: views/op-cache.php:61 360 msgid "Memory" 361 msgstr "" 362 363 #: views/op-cache.php:66 364 msgid "Keys" 365 msgstr "" 366 367 #: views/op-cache.php:71 368 msgid "Engine" 369 msgstr "" 370 364 #: views/litespeed.php:44 365 msgid "LiteSpeed Cache is a very fast page caching system that boosts up your website page load speed." 366 msgstr "" 367 368 #: views/litespeed.php:49 371 369 #: views/op-cache.php:78 372 370 #: views/page-cache.php:51 … … 374 372 msgstr "" 375 373 374 #: views/litespeed.php:58 375 #: views/page-cache.php:59 376 msgid "Disable" 377 msgstr "" 378 379 #: views/litespeed.php:62 380 #: views/page-cache.php:64 381 msgid "Enable Cache" 382 msgstr "" 383 384 #: views/op-cache.php:8 385 msgid "PHP OPcache has been cleared." 386 msgstr "" 387 388 #: views/op-cache.php:20 389 msgid "PHP OPcache" 390 msgstr "" 391 392 #: views/op-cache.php:44 393 msgid "OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request." 394 msgstr "" 395 396 #: views/op-cache.php:51 397 msgid "Hit Rate" 398 msgstr "" 399 400 #: views/op-cache.php:56 401 msgid "Cached Scripts" 402 msgstr "" 403 404 #: views/op-cache.php:61 405 msgid "Memory" 406 msgstr "" 407 408 #: views/op-cache.php:66 409 msgid "Keys" 410 msgstr "" 411 412 #: views/op-cache.php:71 413 msgid "Engine" 414 msgstr "" 415 376 416 #: views/optimizations.php:5 377 417 msgid "WordPress Optimizations" … … 398 438 msgstr "" 399 439 400 #: views/page-cache.php:8401 msgid "Page Caching has been enabled."402 msgstr ""403 404 #: views/page-cache.php:9405 msgid "Page Caching has been disabled."406 msgstr ""407 408 440 #: views/page-cache.php:21 409 441 msgid "Page Cache" … … 414 446 msgstr "" 415 447 416 #: views/page-cache.php:59417 msgid "Disable"418 msgstr ""419 420 #: views/page-cache.php:64421 msgid "Enable Cache"422 msgstr ""423 424 448 #: views/page-cache.php:76 425 449 msgid "Homepage Settings" -
flywp/tags/v1.3/readme.txt
r3107616 r3121638 5 5 Tested up to: 6.5 6 6 Requires PHP: 7.4 7 Stable tag: 1. 27 Stable tag: 1.3 8 8 Requires PHP: 7.1 or higher 9 9 License: GPLv2 or later … … 54 54 55 55 == Changelog == 56 57 = v1.3 (18 July, 2024) = 58 59 * **New:** Added support for OpenLiteSpeed. 56 60 57 61 = v1.2 (25 June, 2024) = -
flywp/tags/v1.3/vendor/composer/autoload_classmap.php
r3107616 r3121638 12 12 'FlyWP\\Admin\\Email' => $baseDir . '/includes/Admin/Email.php', 13 13 'FlyWP\\Admin\\Fastcgi_Cache' => $baseDir . '/includes/Admin/Fastcgi_Cache.php', 14 'FlyWP\\Admin\\Litespeed' => $baseDir . '/includes/Admin/Litespeed.php', 14 15 'FlyWP\\Admin\\Opcache' => $baseDir . '/includes/Admin/Opcache.php', 15 16 'FlyWP\\Admin\\Optimizations' => $baseDir . '/includes/Admin/Optimizations.php', 16 17 'FlyWP\\Admin\\Plugins' => $baseDir . '/includes/Admin/Plugins.php', 17 18 'FlyWP\\Api' => $baseDir . '/includes/Api.php', 18 'FlyWP\\Api\\ Fastcgi_Cache' => $baseDir . '/includes/Api/Fastcgi_Cache.php',19 'FlyWP\\Api\\Cache' => $baseDir . '/includes/Api/Cache.php', 19 20 'FlyWP\\Api\\Health' => $baseDir . '/includes/Api/Health.php', 20 21 'FlyWP\\Api\\Ping' => $baseDir . '/includes/Api/Ping.php', -
flywp/tags/v1.3/vendor/composer/autoload_static.php
r3107616 r3121638 35 35 'FlyWP\\Admin\\Email' => __DIR__ . '/../..' . '/includes/Admin/Email.php', 36 36 'FlyWP\\Admin\\Fastcgi_Cache' => __DIR__ . '/../..' . '/includes/Admin/Fastcgi_Cache.php', 37 'FlyWP\\Admin\\Litespeed' => __DIR__ . '/../..' . '/includes/Admin/Litespeed.php', 37 38 'FlyWP\\Admin\\Opcache' => __DIR__ . '/../..' . '/includes/Admin/Opcache.php', 38 39 'FlyWP\\Admin\\Optimizations' => __DIR__ . '/../..' . '/includes/Admin/Optimizations.php', 39 40 'FlyWP\\Admin\\Plugins' => __DIR__ . '/../..' . '/includes/Admin/Plugins.php', 40 41 'FlyWP\\Api' => __DIR__ . '/../..' . '/includes/Api.php', 41 'FlyWP\\Api\\ Fastcgi_Cache' => __DIR__ . '/../..' . '/includes/Api/Fastcgi_Cache.php',42 'FlyWP\\Api\\Cache' => __DIR__ . '/../..' . '/includes/Api/Cache.php', 42 43 'FlyWP\\Api\\Health' => __DIR__ . '/../..' . '/includes/Api/Health.php', 43 44 'FlyWP\\Api\\Ping' => __DIR__ . '/../..' . '/includes/Api/Ping.php', -
flywp/tags/v1.3/vendor/composer/installed.php
r3107616 r3121638 2 2 'root' => array( 3 3 'name' => 'flywp/flywp', 4 'pretty_version' => '1. 2',5 'version' => '1. 2.0.0',4 'pretty_version' => '1.3', 5 'version' => '1.3.0.0', 6 6 'reference' => null, 7 7 'type' => 'wordpress-plugin', … … 12 12 'versions' => array( 13 13 'flywp/flywp' => array( 14 'pretty_version' => '1. 2',15 'version' => '1. 2.0.0',14 'pretty_version' => '1.3', 15 'version' => '1.3.0.0', 16 16 'reference' => null, 17 17 'type' => 'wordpress-plugin', -
flywp/tags/v1.3/views/admin.php
r3107616 r3121638 1 <?php 2 use FlyWP\Helper; 3 4 ?> 5 1 6 <div class="flywp-settings" id="flywp-settings"> 2 7 <div class="fw-mb-8 fw-bg-white fw-border-b fw-border-solid fw-border-gray-200"> … … 14 19 <div class="fw-flex -fw-mb-px fw-gap-2"> 15 20 <?php foreach ( $tabs as $key => $label ) { ?> 16 <a href="<?php echo esc_url( add_query_arg( [ 17 'tab' => $key, 18 ], $this->page_url() ) ); ?>" class="fw-block fw-px-4 fw-py-3 fw-text-sm -m fw-text-gray-800 fw-no-underline fw-outline-none focus:fw-outline-none <?php echo $key === $active_tab ? 'fw-border-b-2 fw-border-indigo-500 fw-font-semibold' : ''; ?>"><?php echo $label; ?></a> 21 <a href="<?php echo esc_url( add_query_arg( [ 'tab' => $key ], $this->page_url() ) ); ?>" class="fw-block fw-px-4 fw-py-3 fw-text-sm -m fw-text-gray-800 fw-no-underline fw-outline-none focus:fw-outline-none <?php echo $key === $active_tab ? 'fw-border-b-2 fw-border-indigo-500 fw-font-semibold' : ''; ?>"><?php echo $label; ?></a> 19 22 <?php } ?> 20 23 </div> … … 27 30 28 31 if ( $active_tab === 'cache' ) { 29 require __DIR__ . '/page-cache.php'; 32 if ( Helper::is_nginx() ) { 33 require __DIR__ . '/page-cache.php'; 34 } elseif ( Helper::is_litespeed() ) { 35 require __DIR__ . '/litespeed.php'; 36 } 37 30 38 require __DIR__ . '/op-cache.php'; 31 39 } elseif ( $active_tab === 'email' ) { -
flywp/tags/v1.3/views/op-cache.php
r3107616 r3121638 9 9 ]; 10 10 11 if ( isset( $_GET['fly-notice'] ) && isset( $cache_messages[ $_GET['fly-notice']] ) ) {12 $notice = $cache_messages[ $_GET['fly-notice']];11 if ( isset( $_GET['fly-notice'] ) && isset( $cache_messages[ $_GET['fly-notice'] ] ) ) { 12 $notice = $cache_messages[ $_GET['fly-notice'] ]; 13 13 } 14 14 ?> -
flywp/tags/v1.3/views/page-cache.php
r3032189 r3121638 10 10 ]; 11 11 12 if ( isset( $_GET['fly-notice'] ) && isset( $cache_messages[ $_GET['fly-notice']] ) ) {13 $notice = $cache_messages[ $_GET['fly-notice']];12 if ( isset( $_GET['fly-notice'] ) && isset( $cache_messages[ $_GET['fly-notice'] ] ) ) { 13 $notice = $cache_messages[ $_GET['fly-notice'] ]; 14 14 } 15 15 ?> … … 37 37 38 38 <?php if ( $notice ) { ?> 39 <div class="fw-bg-green-200 fw-text-green-800 fw-px-4 fw-py-1 " id="fly-page-cache-notice">39 <div class="fw-bg-green-200 fw-text-green-800 fw-px-4 fw-py-1 fly-form-notice"> 40 40 <p><?php echo esc_html( $notice ); ?></p> 41 41 </div> -
flywp/trunk/flywp.php
r3107616 r3121638 4 4 * Plugin URI: https://flywp.com 5 5 * Description: Helper plugin for FlyWP 6 * Version: 1. 26 * Version: 1.3 7 7 * Author: FlyWP 8 8 * Author URI: https://flywp.com/?utm_source=wporg&utm_medium=banner&utm_campaign=author-uri … … 42 42 * @var string 43 43 */ 44 public $version = '1. 2';44 public $version = '1.3'; 45 45 46 46 /** … … 103 103 } 104 104 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(); 111 $this->optimize = new FlyWP\Optimizations(); 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(); 111 $this->optimize = new FlyWP\Optimizations(); 112 $this->litespeed = new FlyWP\Litespeed(); 112 113 } 113 114 … … 140 141 return FLYWP_API_KEY; 141 142 } 142 143 /**144 * Debugging helper.145 *146 * @param mixed $value147 * @param bool $die148 *149 * @return void150 */151 public function debug( $value, $die = false ) {152 echo '<pre>';153 print_r( $value );154 echo '</pre>';155 156 if ( $die ) {157 die();158 }159 }160 143 } 161 144 -
flywp/trunk/includes/Admin.php
r3107616 r3121638 8 8 * Admin page slug. 9 9 */ 10 const PAGE_SLUG = 'flywp';10 public const PAGE_SLUG = 'flywp'; 11 11 12 12 /** … … 15 15 * @var string 16 16 */ 17 const SCREEN_NAME = 'dashboard_page_flywp';17 public const SCREEN_NAME = 'dashboard_page_flywp'; 18 18 19 public $fastcgi = null; 19 public $fastcgi = null; 20 public $litespeed = null; 20 21 21 22 /** … … 25 26 add_action( 'admin_menu', [ $this, 'register_admin_page' ] ); 26 27 27 $this->fastcgi = new Admin\Fastcgi_Cache(); 28 $this->fastcgi = new Admin\Fastcgi_Cache(); 29 $this->litespeed = new Admin\Litespeed(); 28 30 29 31 new Admin\Adminbar(); … … 101 103 ]; 102 104 105 // phpcs:ignore WordPress.Security.NonceVerification.Recommended 103 106 $active_tab = isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $tabs ) ? $_GET['tab'] : 'cache'; 104 107 $site_info = $this->fetch_site_info(); -
flywp/trunk/includes/Api.php
r3032189 r3121638 26 26 new Api\Themes(); 27 27 new Api\Updates(); 28 new Api\ Fastcgi_Cache();28 new Api\Cache(); 29 29 new Api\Health(); 30 30 } … … 53 53 } 54 54 55 $auth_header = $_SERVER['HTTP_AUTHORIZATION'];55 $auth_header = wp_unslash( $_SERVER['HTTP_AUTHORIZATION'] ); 56 56 57 57 if ( ! preg_match( '/Bearer\s(\S+)/', $auth_header, $matches ) ) { -
flywp/trunk/includes/FlyApi.php
r3007756 r3121638 21 21 * @return array|false 22 22 */ 23 public function cache_toggle( $action = 'enable' ) {23 public function cache_toggle( $action = 'enable', $type = 'fastcgi' ) { 24 24 return $this->post( 25 25 '/cache-toggle', 26 26 [ 27 27 'action' => $action, 28 'type' => $type, 28 29 ] 29 30 ); -
flywp/trunk/includes/Helper.php
r2925476 r3121638 25 25 die(); 26 26 } 27 28 /** 29 * Check if server is running Nginx. 30 * 31 * @return bool 32 */ 33 public static function is_nginx() { 34 return isset( $_SERVER['SERVER_SOFTWARE'] ) && false !== strpos( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ), 'nginx' ); 35 } 36 37 /** 38 * Check if server is running LiteSpeed. 39 * 40 * @return bool 41 */ 42 public static function is_litespeed() { 43 return isset( $_SERVER['SERVER_SOFTWARE'] ) && false !== strpos( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ), 'LiteSpeed' ); 44 } 27 45 } -
flywp/trunk/languages/flywp.pot
r3107616 r3121638 2 2 msgid "" 3 3 msgstr "" 4 "Project-Id-Version: FlyWP 1. 2\n"4 "Project-Id-Version: FlyWP 1.3\n" 5 5 "Report-Msgid-Bugs-To: https://github.com/flywp/flywp-helper/issues\n" 6 6 "Last-Translator: [email protected]\n" … … 9 9 "Content-Type: text/plain; charset=UTF-8\n" 10 10 "Content-Transfer-Encoding: 8bit\n" 11 "POT-Creation-Date: 2024-0 6-25T16:47:30+00:00\n"11 "POT-Creation-Date: 2024-07-18T16:21:08+00:00\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "X-Generator: WP-CLI 2.10.0\n" … … 17 17 #. Author of the plugin 18 18 #: flywp.php 19 #: includes/Admin.php:4 120 #: includes/Admin.php:4 219 #: includes/Admin.php:43 20 #: includes/Admin.php:44 21 21 #: includes/Admin/Adminbar.php:32 22 22 msgid "FlyWP" … … 38 38 msgstr "" 39 39 40 #: flywp.php:12 040 #: flywp.php:121 41 41 msgid "Missing FlyWP API key, plugin requires an API key." 42 42 msgstr "" 43 43 44 #: includes/Admin.php: 9844 #: includes/Admin.php:100 45 45 msgid "Caching" 46 46 msgstr "" 47 47 48 #: includes/Admin.php: 9948 #: includes/Admin.php:101 49 49 msgid "Email" 50 50 msgstr "" 51 51 52 #: includes/Admin.php:10 052 #: includes/Admin.php:102 53 53 msgid "Optimizations" 54 54 msgstr "" … … 68 68 #: includes/Admin/Adminbar.php:75 69 69 #: includes/Admin/Plugins.php:25 70 #: includes/LiteSpeed.php:69 70 71 #: views/page-cache.php:70 71 72 msgid "Settings" … … 256 257 msgstr "" 257 258 258 #: views/admin.php:10 259 #: includes/LiteSpeed.php:77 260 msgid "Activate Plugin" 261 msgstr "" 262 263 #: includes/LiteSpeed.php:86 264 msgid "Install Plugin" 265 msgstr "" 266 267 #: views/admin.php:15 259 268 msgid "FlyWP Dashboard" 260 269 msgstr "" … … 325 334 msgstr "" 326 335 327 #: views/op-cache.php:8 328 msgid "PHP OPcache has been cleared." 329 msgstr "" 330 331 #: views/op-cache.php:20 332 msgid "PHP OPcache" 333 msgstr "" 334 336 #: views/litespeed.php:6 337 #: views/page-cache.php:8 338 msgid "Page Caching has been enabled." 339 msgstr "" 340 341 #: views/litespeed.php:7 342 #: views/page-cache.php:9 343 msgid "Page Caching has been disabled." 344 msgstr "" 345 346 #: views/litespeed.php:19 347 msgid "LiteSpeed Cache" 348 msgstr "" 349 350 #: views/litespeed.php:25 335 351 #: views/op-cache.php:26 336 352 #: views/optimizations.php:11 … … 339 355 msgstr "" 340 356 357 #: views/litespeed.php:31 341 358 #: views/op-cache.php:32 342 359 #: views/optimizations.php:17 … … 345 362 msgstr "" 346 363 347 #: views/op-cache.php:44 348 msgid "OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request." 349 msgstr "" 350 351 #: views/op-cache.php:51 352 msgid "Hit Rate" 353 msgstr "" 354 355 #: views/op-cache.php:56 356 msgid "Cached Scripts" 357 msgstr "" 358 359 #: views/op-cache.php:61 360 msgid "Memory" 361 msgstr "" 362 363 #: views/op-cache.php:66 364 msgid "Keys" 365 msgstr "" 366 367 #: views/op-cache.php:71 368 msgid "Engine" 369 msgstr "" 370 364 #: views/litespeed.php:44 365 msgid "LiteSpeed Cache is a very fast page caching system that boosts up your website page load speed." 366 msgstr "" 367 368 #: views/litespeed.php:49 371 369 #: views/op-cache.php:78 372 370 #: views/page-cache.php:51 … … 374 372 msgstr "" 375 373 374 #: views/litespeed.php:58 375 #: views/page-cache.php:59 376 msgid "Disable" 377 msgstr "" 378 379 #: views/litespeed.php:62 380 #: views/page-cache.php:64 381 msgid "Enable Cache" 382 msgstr "" 383 384 #: views/op-cache.php:8 385 msgid "PHP OPcache has been cleared." 386 msgstr "" 387 388 #: views/op-cache.php:20 389 msgid "PHP OPcache" 390 msgstr "" 391 392 #: views/op-cache.php:44 393 msgid "OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request." 394 msgstr "" 395 396 #: views/op-cache.php:51 397 msgid "Hit Rate" 398 msgstr "" 399 400 #: views/op-cache.php:56 401 msgid "Cached Scripts" 402 msgstr "" 403 404 #: views/op-cache.php:61 405 msgid "Memory" 406 msgstr "" 407 408 #: views/op-cache.php:66 409 msgid "Keys" 410 msgstr "" 411 412 #: views/op-cache.php:71 413 msgid "Engine" 414 msgstr "" 415 376 416 #: views/optimizations.php:5 377 417 msgid "WordPress Optimizations" … … 398 438 msgstr "" 399 439 400 #: views/page-cache.php:8401 msgid "Page Caching has been enabled."402 msgstr ""403 404 #: views/page-cache.php:9405 msgid "Page Caching has been disabled."406 msgstr ""407 408 440 #: views/page-cache.php:21 409 441 msgid "Page Cache" … … 414 446 msgstr "" 415 447 416 #: views/page-cache.php:59417 msgid "Disable"418 msgstr ""419 420 #: views/page-cache.php:64421 msgid "Enable Cache"422 msgstr ""423 424 448 #: views/page-cache.php:76 425 449 msgid "Homepage Settings" -
flywp/trunk/readme.txt
r3107616 r3121638 5 5 Tested up to: 6.5 6 6 Requires PHP: 7.4 7 Stable tag: 1. 27 Stable tag: 1.3 8 8 Requires PHP: 7.1 or higher 9 9 License: GPLv2 or later … … 54 54 55 55 == Changelog == 56 57 = v1.3 (18 July, 2024) = 58 59 * **New:** Added support for OpenLiteSpeed. 56 60 57 61 = v1.2 (25 June, 2024) = -
flywp/trunk/vendor/composer/autoload_classmap.php
r3107616 r3121638 12 12 'FlyWP\\Admin\\Email' => $baseDir . '/includes/Admin/Email.php', 13 13 'FlyWP\\Admin\\Fastcgi_Cache' => $baseDir . '/includes/Admin/Fastcgi_Cache.php', 14 'FlyWP\\Admin\\Litespeed' => $baseDir . '/includes/Admin/Litespeed.php', 14 15 'FlyWP\\Admin\\Opcache' => $baseDir . '/includes/Admin/Opcache.php', 15 16 'FlyWP\\Admin\\Optimizations' => $baseDir . '/includes/Admin/Optimizations.php', 16 17 'FlyWP\\Admin\\Plugins' => $baseDir . '/includes/Admin/Plugins.php', 17 18 'FlyWP\\Api' => $baseDir . '/includes/Api.php', 18 'FlyWP\\Api\\ Fastcgi_Cache' => $baseDir . '/includes/Api/Fastcgi_Cache.php',19 'FlyWP\\Api\\Cache' => $baseDir . '/includes/Api/Cache.php', 19 20 'FlyWP\\Api\\Health' => $baseDir . '/includes/Api/Health.php', 20 21 'FlyWP\\Api\\Ping' => $baseDir . '/includes/Api/Ping.php', -
flywp/trunk/vendor/composer/autoload_static.php
r3107616 r3121638 35 35 'FlyWP\\Admin\\Email' => __DIR__ . '/../..' . '/includes/Admin/Email.php', 36 36 'FlyWP\\Admin\\Fastcgi_Cache' => __DIR__ . '/../..' . '/includes/Admin/Fastcgi_Cache.php', 37 'FlyWP\\Admin\\Litespeed' => __DIR__ . '/../..' . '/includes/Admin/Litespeed.php', 37 38 'FlyWP\\Admin\\Opcache' => __DIR__ . '/../..' . '/includes/Admin/Opcache.php', 38 39 'FlyWP\\Admin\\Optimizations' => __DIR__ . '/../..' . '/includes/Admin/Optimizations.php', 39 40 'FlyWP\\Admin\\Plugins' => __DIR__ . '/../..' . '/includes/Admin/Plugins.php', 40 41 'FlyWP\\Api' => __DIR__ . '/../..' . '/includes/Api.php', 41 'FlyWP\\Api\\ Fastcgi_Cache' => __DIR__ . '/../..' . '/includes/Api/Fastcgi_Cache.php',42 'FlyWP\\Api\\Cache' => __DIR__ . '/../..' . '/includes/Api/Cache.php', 42 43 'FlyWP\\Api\\Health' => __DIR__ . '/../..' . '/includes/Api/Health.php', 43 44 'FlyWP\\Api\\Ping' => __DIR__ . '/../..' . '/includes/Api/Ping.php', -
flywp/trunk/vendor/composer/installed.php
r3107616 r3121638 2 2 'root' => array( 3 3 'name' => 'flywp/flywp', 4 'pretty_version' => '1. 2',5 'version' => '1. 2.0.0',4 'pretty_version' => '1.3', 5 'version' => '1.3.0.0', 6 6 'reference' => null, 7 7 'type' => 'wordpress-plugin', … … 12 12 'versions' => array( 13 13 'flywp/flywp' => array( 14 'pretty_version' => '1. 2',15 'version' => '1. 2.0.0',14 'pretty_version' => '1.3', 15 'version' => '1.3.0.0', 16 16 'reference' => null, 17 17 'type' => 'wordpress-plugin', -
flywp/trunk/views/admin.php
r3107616 r3121638 1 <?php 2 use FlyWP\Helper; 3 4 ?> 5 1 6 <div class="flywp-settings" id="flywp-settings"> 2 7 <div class="fw-mb-8 fw-bg-white fw-border-b fw-border-solid fw-border-gray-200"> … … 14 19 <div class="fw-flex -fw-mb-px fw-gap-2"> 15 20 <?php foreach ( $tabs as $key => $label ) { ?> 16 <a href="<?php echo esc_url( add_query_arg( [ 17 'tab' => $key, 18 ], $this->page_url() ) ); ?>" class="fw-block fw-px-4 fw-py-3 fw-text-sm -m fw-text-gray-800 fw-no-underline fw-outline-none focus:fw-outline-none <?php echo $key === $active_tab ? 'fw-border-b-2 fw-border-indigo-500 fw-font-semibold' : ''; ?>"><?php echo $label; ?></a> 21 <a href="<?php echo esc_url( add_query_arg( [ 'tab' => $key ], $this->page_url() ) ); ?>" class="fw-block fw-px-4 fw-py-3 fw-text-sm -m fw-text-gray-800 fw-no-underline fw-outline-none focus:fw-outline-none <?php echo $key === $active_tab ? 'fw-border-b-2 fw-border-indigo-500 fw-font-semibold' : ''; ?>"><?php echo $label; ?></a> 19 22 <?php } ?> 20 23 </div> … … 27 30 28 31 if ( $active_tab === 'cache' ) { 29 require __DIR__ . '/page-cache.php'; 32 if ( Helper::is_nginx() ) { 33 require __DIR__ . '/page-cache.php'; 34 } elseif ( Helper::is_litespeed() ) { 35 require __DIR__ . '/litespeed.php'; 36 } 37 30 38 require __DIR__ . '/op-cache.php'; 31 39 } elseif ( $active_tab === 'email' ) { -
flywp/trunk/views/op-cache.php
r3107616 r3121638 9 9 ]; 10 10 11 if ( isset( $_GET['fly-notice'] ) && isset( $cache_messages[ $_GET['fly-notice']] ) ) {12 $notice = $cache_messages[ $_GET['fly-notice']];11 if ( isset( $_GET['fly-notice'] ) && isset( $cache_messages[ $_GET['fly-notice'] ] ) ) { 12 $notice = $cache_messages[ $_GET['fly-notice'] ]; 13 13 } 14 14 ?> -
flywp/trunk/views/page-cache.php
r3032189 r3121638 10 10 ]; 11 11 12 if ( isset( $_GET['fly-notice'] ) && isset( $cache_messages[ $_GET['fly-notice']] ) ) {13 $notice = $cache_messages[ $_GET['fly-notice']];12 if ( isset( $_GET['fly-notice'] ) && isset( $cache_messages[ $_GET['fly-notice'] ] ) ) { 13 $notice = $cache_messages[ $_GET['fly-notice'] ]; 14 14 } 15 15 ?> … … 37 37 38 38 <?php if ( $notice ) { ?> 39 <div class="fw-bg-green-200 fw-text-green-800 fw-px-4 fw-py-1 " id="fly-page-cache-notice">39 <div class="fw-bg-green-200 fw-text-green-800 fw-px-4 fw-py-1 fly-form-notice"> 40 40 <p><?php echo esc_html( $notice ); ?></p> 41 41 </div>
Note: See TracChangeset
for help on using the changeset viewer.