Version Description
- May 20 2020 =
- Network Added Debug settings to network level when on network.
- Purge Network now can purge all.
- Network Fixed issue where saving the network primary site settings failed.
- Network Moved Beta Test to network level when on network.
- Cache Fixed issue in admin where new post editor was wrongly cached for non-admin roles. (@TEKFused)
- Data Fixed issue with crawler & img_optm table creation failure. (@berdini @piercand)
- Core Improved plugin activation compatibility on Windows 10 #224 (@greenphp)
- Core Improved compatibility for .htaccess path search.
- Object Catch RedisException. (@elparts)
- Fixed Script URI issue in 3.0.9 #223 (@aonsyed)
- Image Optimize Show thumbnail size set list in image optimization summary. (@Johnny Nguyen)
- Debug Parameters will now be logged.
Download this release
Release Info
Developer | hailite |
Plugin | LiteSpeed Cache |
Version | 3.1 |
Comparing to | |
See all releases |
Code changes from version 3.0.9 to 3.1
- data/const.network_default.ini +32 -0
- lang/litespeed-cache.pot +73 -69
- litespeed-cache.php +2 -2
- readme.txt +15 -1
- src/admin-settings.cls.php +1 -1
- src/admin.cls.php +4 -5
- src/base.cls.php +15 -0
- src/conf.cls.php +13 -3
- src/data_structure/crawler.sql +1 -1
- src/data_structure/crawler_blacklist.sql +1 -1
- src/data_structure/img_optming.sql +1 -1
- src/debug2.cls.php +17 -3
- src/htaccess.cls.php +12 -11
- src/img-optm.cls.php +4 -4
- src/object-cache.cls.php +5 -1
- src/router.cls.php +17 -13
- src/task.cls.php +8 -8
- tpl/crawler/settings-sitemap.tpl.php +1 -1
- tpl/img_optm/summary.tpl.php +11 -0
- tpl/toolbox/entry.tpl.php +4 -0
- tpl/toolbox/settings-debug.tpl.php +1 -1
data/const.network_default.ini
CHANGED
@@ -97,6 +97,38 @@ counts
|
|
97 |
plugins'
|
98 |
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
;; -------------------------------------------------- ;;
|
101 |
;; -------------- Image Optm ----------------- ;;
|
102 |
;; -------------------------------------------------- ;;
|
97 |
plugins'
|
98 |
|
99 |
|
100 |
+
;; -------------------------------------------------- ;;
|
101 |
+
;; -------------- Debug ----------------- ;;
|
102 |
+
;; -------------------------------------------------- ;;
|
103 |
+
|
104 |
+
; O_DEBUG_DISABLE_ALL
|
105 |
+
debug-disable_all = false
|
106 |
+
|
107 |
+
; O_DEBUG
|
108 |
+
debug = false
|
109 |
+
|
110 |
+
; O_DEBUG_IPS
|
111 |
+
debug-ips = '127.0.0.1'
|
112 |
+
|
113 |
+
; O_DEBUG_LEVEL
|
114 |
+
debug-level = false
|
115 |
+
|
116 |
+
; O_DEBUG_FILESIZE
|
117 |
+
debug-filesize = 3
|
118 |
+
|
119 |
+
; O_DEBUG_COOKIE
|
120 |
+
debug-cookie = false
|
121 |
+
|
122 |
+
; O_DEBUG_COLLAPS_QS
|
123 |
+
debug-collaps_qs = false
|
124 |
+
|
125 |
+
; O_DEBUG_INC
|
126 |
+
debug-inc = ''
|
127 |
+
|
128 |
+
; O_DEBUG_EXC
|
129 |
+
debug-exc = ''
|
130 |
+
|
131 |
+
|
132 |
;; -------------------------------------------------- ;;
|
133 |
;; -------------- Image Optm ----------------- ;;
|
134 |
;; -------------------------------------------------- ;;
|
lang/litespeed-cache.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the LiteSpeed Cache package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: LiteSpeed Cache 3.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
|
7 |
-
"POT-Creation-Date: 2020-05-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -182,8 +182,8 @@ msgid "Server variable(s) %s available to override this setting."
|
|
182 |
msgstr ""
|
183 |
|
184 |
#: src/admin-display.cls.php:1083 src/doc.cls.php:38 tpl/cdn/manage.tpl.php:66
|
185 |
-
#: tpl/dash/dashboard.tpl.php:46 tpl/img_optm/summary.tpl.php:
|
186 |
-
#: tpl/img_optm/summary.tpl.php:
|
187 |
msgid "Learn More"
|
188 |
msgstr ""
|
189 |
|
@@ -314,7 +314,7 @@ msgstr ""
|
|
314 |
msgid "Sync credit allowance with Cloud Server successfully."
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: src/conf.cls.php:
|
318 |
msgid "Changed setting successfully."
|
319 |
msgstr ""
|
320 |
|
@@ -666,11 +666,11 @@ msgstr ""
|
|
666 |
msgid "Cloudflare"
|
667 |
msgstr ""
|
668 |
|
669 |
-
#: src/gui.cls.php:713 tpl/img_optm/summary.tpl.php:
|
670 |
msgid "Remove all previous unfinished image optimization requests."
|
671 |
msgstr ""
|
672 |
|
673 |
-
#: src/gui.cls.php:714 tpl/img_optm/summary.tpl.php:
|
674 |
msgid "Clean Up Unfinished Data"
|
675 |
msgstr ""
|
676 |
|
@@ -696,17 +696,17 @@ msgstr ""
|
|
696 |
msgid "Update %s now"
|
697 |
msgstr ""
|
698 |
|
699 |
-
#: src/htaccess.cls.php:
|
700 |
msgid "Mobile Agent Rules"
|
701 |
msgstr ""
|
702 |
|
703 |
-
#: src/htaccess.cls.php:
|
704 |
msgid ""
|
705 |
"<p>Please add/replace the following codes into the beginning of %1$s:</p> "
|
706 |
"%2$s"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: src/htaccess.cls.php:
|
710 |
msgid "File Saved."
|
711 |
msgstr ""
|
712 |
|
@@ -747,7 +747,7 @@ msgid "Optimized image file expired and was cleared."
|
|
747 |
msgstr ""
|
748 |
|
749 |
#: src/img-optm.cls.php:872
|
750 |
-
msgid "Pulled image md5
|
751 |
msgstr ""
|
752 |
|
753 |
#: src/img-optm.cls.php:916
|
@@ -755,7 +755,7 @@ msgid "Optimized WebP file expired and was cleared."
|
|
755 |
msgstr ""
|
756 |
|
757 |
#: src/img-optm.cls.php:933
|
758 |
-
msgid "Pulled WebP image md5
|
759 |
msgstr ""
|
760 |
|
761 |
#: src/img-optm.cls.php:989
|
@@ -1835,7 +1835,7 @@ msgstr ""
|
|
1835 |
msgid "Dismiss this notice"
|
1836 |
msgstr ""
|
1837 |
|
1838 |
-
#. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 3.
|
1839 |
#. Plugin Name of the plugin/theme
|
1840 |
#: tpl/banner/new_version.php:59 tpl/banner/new_version_dev.tpl.php:12
|
1841 |
#: tpl/cache/more_settings_tip.tpl.php:15 tpl/inc/admin_footer.php:8
|
@@ -2877,7 +2877,7 @@ msgstr ""
|
|
2877 |
msgid "Blacklist"
|
2878 |
msgstr ""
|
2879 |
|
2880 |
-
#: tpl/crawler/blacklist.tpl.php:22 tpl/img_optm/summary.tpl.php:
|
2881 |
msgid "Total"
|
2882 |
msgstr ""
|
2883 |
|
@@ -3374,7 +3374,7 @@ msgstr ""
|
|
3374 |
msgid "Current closest Cloud server is %s. Click to redetect."
|
3375 |
msgstr ""
|
3376 |
|
3377 |
-
#: tpl/dash/dashboard.tpl.php:202 tpl/img_optm/summary.tpl.php:
|
3378 |
#: tpl/page_optm/settings_css.tpl.php:121
|
3379 |
#: tpl/page_optm/settings_media.tpl.php:172
|
3380 |
msgid "Are you sure to redetect the closest cloud server for this service?"
|
@@ -3396,7 +3396,7 @@ msgstr ""
|
|
3396 |
msgid "Images Requested"
|
3397 |
msgstr ""
|
3398 |
|
3399 |
-
#: tpl/dash/dashboard.tpl.php:322 tpl/img_optm/summary.tpl.php:
|
3400 |
msgid "Last Request"
|
3401 |
msgstr ""
|
3402 |
|
@@ -3818,11 +3818,11 @@ msgid ""
|
|
3818 |
"images."
|
3819 |
msgstr ""
|
3820 |
|
3821 |
-
#: tpl/img_optm/settings.tpl.php:66 tpl/img_optm/summary.tpl.php:
|
3822 |
msgid "This is irreversible."
|
3823 |
msgstr ""
|
3824 |
|
3825 |
-
#: tpl/img_optm/settings.tpl.php:67 tpl/img_optm/summary.tpl.php:
|
3826 |
msgid "You will be unable to Revert Optimization once the backups are deleted!"
|
3827 |
msgstr ""
|
3828 |
|
@@ -3863,207 +3863,211 @@ msgstr ""
|
|
3863 |
msgid "The image compression quality setting of WordPress out of 100."
|
3864 |
msgstr ""
|
3865 |
|
3866 |
-
#: tpl/img_optm/summary.tpl.php:
|
3867 |
#: tpl/page_optm/settings_media.tpl.php:172
|
3868 |
msgid "Current closest Cloud server is %s. Click to redetect."
|
3869 |
msgstr ""
|
3870 |
|
3871 |
-
#: tpl/img_optm/summary.tpl.php:
|
3872 |
msgid "Optimize images with our cloud server"
|
3873 |
msgstr ""
|
3874 |
|
3875 |
-
#: tpl/img_optm/summary.tpl.php:
|
3876 |
msgid "You can request a maximum of %s images at once."
|
3877 |
msgstr ""
|
3878 |
|
3879 |
-
#: tpl/img_optm/summary.tpl.php:
|
3880 |
msgid ""
|
3881 |
"To make sure our server can communicate with your server without any issues "
|
3882 |
"and everything works fine, for the few first requests the amount images "
|
3883 |
"allowed in single request is limited."
|
3884 |
msgstr ""
|
3885 |
|
3886 |
-
#: tpl/img_optm/summary.tpl.php:
|
3887 |
msgid "Current limit is"
|
3888 |
msgstr ""
|
3889 |
|
3890 |
-
#: tpl/img_optm/summary.tpl.php:
|
3891 |
msgid "Gather Image Data"
|
3892 |
msgstr ""
|
3893 |
|
3894 |
-
#: tpl/img_optm/summary.tpl.php:
|
3895 |
msgid "Send Optimization Request"
|
3896 |
msgstr ""
|
3897 |
|
3898 |
-
#: tpl/img_optm/summary.tpl.php:
|
3899 |
msgid "Only press the button if the pull cron job is disabled."
|
3900 |
msgstr ""
|
3901 |
|
3902 |
-
#: tpl/img_optm/summary.tpl.php:
|
3903 |
msgid "Images will be pulled automatically if the cron job is running."
|
3904 |
msgstr ""
|
3905 |
|
3906 |
-
#: tpl/img_optm/summary.tpl.php:
|
3907 |
msgid "Pull Images"
|
3908 |
msgstr ""
|
3909 |
|
3910 |
-
#: tpl/img_optm/summary.tpl.php:
|
3911 |
msgid "Optimization Status"
|
3912 |
msgstr ""
|
3913 |
|
3914 |
-
#: tpl/img_optm/summary.tpl.php:
|
3915 |
msgid ""
|
3916 |
"After LiteSpeed's Image Optimization Server finishes optimization, it will "
|
3917 |
"notify your site to pull the optimized images."
|
3918 |
msgstr ""
|
3919 |
|
3920 |
-
#: tpl/img_optm/summary.tpl.php:
|
3921 |
msgid "This process is automatic."
|
3922 |
msgstr ""
|
3923 |
|
3924 |
-
#: tpl/img_optm/summary.tpl.php:
|
3925 |
msgid "Last pull initiated by cron at %s."
|
3926 |
msgstr ""
|
3927 |
|
3928 |
-
#: tpl/img_optm/summary.tpl.php:
|
3929 |
msgid "Storage Optimization"
|
3930 |
msgstr ""
|
3931 |
|
3932 |
-
#: tpl/img_optm/summary.tpl.php:
|
3933 |
msgid "A backup of each image is saved before it is optimized."
|
3934 |
msgstr ""
|
3935 |
|
3936 |
-
#: tpl/img_optm/summary.tpl.php:
|
3937 |
msgid "Last calculated"
|
3938 |
msgstr ""
|
3939 |
|
3940 |
-
#: tpl/img_optm/summary.tpl.php:
|
3941 |
msgid "Files"
|
3942 |
msgstr ""
|
3943 |
|
3944 |
-
#: tpl/img_optm/summary.tpl.php:
|
3945 |
msgid "Calculate Original Image Storage"
|
3946 |
msgstr ""
|
3947 |
|
3948 |
-
#: tpl/img_optm/summary.tpl.php:
|
3949 |
msgid "Calculate Backups Disk Space"
|
3950 |
msgstr ""
|
3951 |
|
3952 |
#: tpl/img_optm/summary.tpl.php:217
|
|
|
|
|
|
|
|
|
3953 |
msgid "Delete all backups of the original images"
|
3954 |
msgstr ""
|
3955 |
|
3956 |
-
#: tpl/img_optm/summary.tpl.php:
|
3957 |
#: tpl/page_optm/settings_discussion.tpl.php:51
|
3958 |
msgid "Last ran"
|
3959 |
msgstr ""
|
3960 |
|
3961 |
-
#: tpl/img_optm/summary.tpl.php:
|
3962 |
msgid "Saved"
|
3963 |
msgstr ""
|
3964 |
|
3965 |
-
#: tpl/img_optm/summary.tpl.php:
|
3966 |
msgid "Are you sure to remove all image backups?"
|
3967 |
msgstr ""
|
3968 |
|
3969 |
-
#: tpl/img_optm/summary.tpl.php:
|
3970 |
msgid "Remove Original Image Backups"
|
3971 |
msgstr ""
|
3972 |
|
3973 |
-
#: tpl/img_optm/summary.tpl.php:
|
3974 |
msgid "Image Information"
|
3975 |
msgstr ""
|
3976 |
|
3977 |
-
#: tpl/img_optm/summary.tpl.php:
|
3978 |
msgid "Images total"
|
3979 |
msgstr ""
|
3980 |
|
3981 |
-
#: tpl/img_optm/summary.tpl.php:
|
3982 |
msgid "What is a group?"
|
3983 |
msgstr ""
|
3984 |
|
3985 |
-
#: tpl/img_optm/summary.tpl.php:
|
3986 |
msgid "What is an image group?"
|
3987 |
msgstr ""
|
3988 |
|
3989 |
-
#: tpl/img_optm/summary.tpl.php:
|
3990 |
msgid "Images not yet gathered"
|
3991 |
msgstr ""
|
3992 |
|
3993 |
-
#: tpl/img_optm/summary.tpl.php:
|
3994 |
msgid "Congratulations, all gathered!"
|
3995 |
msgstr ""
|
3996 |
|
3997 |
-
#: tpl/img_optm/summary.tpl.php:
|
3998 |
msgid "Images not yet requested"
|
3999 |
msgstr ""
|
4000 |
|
4001 |
-
#: tpl/img_optm/summary.tpl.php:
|
4002 |
msgid "Congratulations, all requested!"
|
4003 |
msgstr ""
|
4004 |
|
4005 |
-
#: tpl/img_optm/summary.tpl.php:
|
4006 |
msgid ""
|
4007 |
"Scan for any new unoptimized image thumbnail sizes and resend necessary "
|
4008 |
"image optimization requests."
|
4009 |
msgstr ""
|
4010 |
|
4011 |
-
#: tpl/img_optm/summary.tpl.php:
|
4012 |
msgid "Rescan New Thumbnails"
|
4013 |
msgstr ""
|
4014 |
|
4015 |
-
#: tpl/img_optm/summary.tpl.php:
|
4016 |
msgid "Optimization Summary"
|
4017 |
msgstr ""
|
4018 |
|
4019 |
-
#: tpl/img_optm/summary.tpl.php:
|
4020 |
msgid "Total Reduction"
|
4021 |
msgstr ""
|
4022 |
|
4023 |
-
#: tpl/img_optm/summary.tpl.php:
|
4024 |
msgid "Images Pulled"
|
4025 |
msgstr ""
|
4026 |
|
4027 |
-
#: tpl/img_optm/summary.tpl.php:
|
4028 |
msgid "Results can be checked in <a %s>Media Library</a>."
|
4029 |
msgstr ""
|
4030 |
|
4031 |
-
#: tpl/img_optm/summary.tpl.php:
|
4032 |
msgid "Optimization Tools"
|
4033 |
msgstr ""
|
4034 |
|
4035 |
-
#: tpl/img_optm/summary.tpl.php:
|
4036 |
msgid ""
|
4037 |
"You can quickly switch between using original (unoptimized versions) and "
|
4038 |
"optimized image files. It will affect all images on your website, both "
|
4039 |
"regular and webp versions if available."
|
4040 |
msgstr ""
|
4041 |
|
4042 |
-
#: tpl/img_optm/summary.tpl.php:
|
4043 |
msgid "Use original images (unoptimized) on your site"
|
4044 |
msgstr ""
|
4045 |
|
4046 |
-
#: tpl/img_optm/summary.tpl.php:
|
4047 |
msgid "Use Original Files"
|
4048 |
msgstr ""
|
4049 |
|
4050 |
-
#: tpl/img_optm/summary.tpl.php:
|
4051 |
msgid "Switch back to using optimized images on your site"
|
4052 |
msgstr ""
|
4053 |
|
4054 |
-
#: tpl/img_optm/summary.tpl.php:
|
4055 |
msgid "Use Optimized Files"
|
4056 |
msgstr ""
|
4057 |
|
4058 |
-
#: tpl/img_optm/summary.tpl.php:
|
4059 |
msgid "Are you sure to destroy all optimized images?"
|
4060 |
msgstr ""
|
4061 |
|
4062 |
-
#: tpl/img_optm/summary.tpl.php:
|
4063 |
msgid "Destroy All Optimization Data"
|
4064 |
msgstr ""
|
4065 |
|
4066 |
-
#: tpl/img_optm/summary.tpl.php:
|
4067 |
msgid ""
|
4068 |
"Remove all previous image optimization requests/results, revert completed "
|
4069 |
"optimizations, and delete all optimization files."
|
@@ -4874,19 +4878,19 @@ msgstr ""
|
|
4874 |
msgid "Report"
|
4875 |
msgstr ""
|
4876 |
|
4877 |
-
#: tpl/toolbox/entry.tpl.php:
|
4878 |
msgid "Debug Settings"
|
4879 |
msgstr ""
|
4880 |
|
4881 |
-
#: tpl/toolbox/entry.tpl.php:
|
4882 |
msgid "Log View"
|
4883 |
msgstr ""
|
4884 |
|
4885 |
-
#: tpl/toolbox/entry.tpl.php:
|
4886 |
msgid "Beta Test"
|
4887 |
msgstr ""
|
4888 |
|
4889 |
-
#: tpl/toolbox/entry.tpl.php:
|
4890 |
msgid "LiteSpeed Cache Toolbox"
|
4891 |
msgstr ""
|
4892 |
|
2 |
# This file is distributed under the same license as the LiteSpeed Cache package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: LiteSpeed Cache 3.1\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
|
7 |
+
"POT-Creation-Date: 2020-05-20 12:46:18+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
182 |
msgstr ""
|
183 |
|
184 |
#: src/admin-display.cls.php:1083 src/doc.cls.php:38 tpl/cdn/manage.tpl.php:66
|
185 |
+
#: tpl/dash/dashboard.tpl.php:46 tpl/img_optm/summary.tpl.php:57
|
186 |
+
#: tpl/img_optm/summary.tpl.php:97 tpl/inc/check_cache_disabled.php:42
|
187 |
msgid "Learn More"
|
188 |
msgstr ""
|
189 |
|
314 |
msgid "Sync credit allowance with Cloud Server successfully."
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: src/conf.cls.php:721
|
318 |
msgid "Changed setting successfully."
|
319 |
msgstr ""
|
320 |
|
666 |
msgid "Cloudflare"
|
667 |
msgstr ""
|
668 |
|
669 |
+
#: src/gui.cls.php:713 tpl/img_optm/summary.tpl.php:170
|
670 |
msgid "Remove all previous unfinished image optimization requests."
|
671 |
msgstr ""
|
672 |
|
673 |
+
#: src/gui.cls.php:714 tpl/img_optm/summary.tpl.php:172
|
674 |
msgid "Clean Up Unfinished Data"
|
675 |
msgstr ""
|
676 |
|
696 |
msgid "Update %s now"
|
697 |
msgstr ""
|
698 |
|
699 |
+
#: src/htaccess.cls.php:365
|
700 |
msgid "Mobile Agent Rules"
|
701 |
msgstr ""
|
702 |
|
703 |
+
#: src/htaccess.cls.php:847
|
704 |
msgid ""
|
705 |
"<p>Please add/replace the following codes into the beginning of %1$s:</p> "
|
706 |
"%2$s"
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: src/htaccess.cls.php:917
|
710 |
msgid "File Saved."
|
711 |
msgstr ""
|
712 |
|
747 |
msgstr ""
|
748 |
|
749 |
#: src/img-optm.cls.php:872
|
750 |
+
msgid "Pulled image md5 does not match the notified image md5."
|
751 |
msgstr ""
|
752 |
|
753 |
#: src/img-optm.cls.php:916
|
755 |
msgstr ""
|
756 |
|
757 |
#: src/img-optm.cls.php:933
|
758 |
+
msgid "Pulled WebP image md5 does not match the notified WebP image md5."
|
759 |
msgstr ""
|
760 |
|
761 |
#: src/img-optm.cls.php:989
|
1835 |
msgid "Dismiss this notice"
|
1836 |
msgstr ""
|
1837 |
|
1838 |
+
#. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 3.1) #-#-#-#-#
|
1839 |
#. Plugin Name of the plugin/theme
|
1840 |
#: tpl/banner/new_version.php:59 tpl/banner/new_version_dev.tpl.php:12
|
1841 |
#: tpl/cache/more_settings_tip.tpl.php:15 tpl/inc/admin_footer.php:8
|
2877 |
msgid "Blacklist"
|
2878 |
msgstr ""
|
2879 |
|
2880 |
+
#: tpl/crawler/blacklist.tpl.php:22 tpl/img_optm/summary.tpl.php:195
|
2881 |
msgid "Total"
|
2882 |
msgstr ""
|
2883 |
|
3374 |
msgid "Current closest Cloud server is %s. Click to redetect."
|
3375 |
msgstr ""
|
3376 |
|
3377 |
+
#: tpl/dash/dashboard.tpl.php:202 tpl/img_optm/summary.tpl.php:52
|
3378 |
#: tpl/page_optm/settings_css.tpl.php:121
|
3379 |
#: tpl/page_optm/settings_media.tpl.php:172
|
3380 |
msgid "Are you sure to redetect the closest cloud server for this service?"
|
3396 |
msgid "Images Requested"
|
3397 |
msgstr ""
|
3398 |
|
3399 |
+
#: tpl/dash/dashboard.tpl.php:322 tpl/img_optm/summary.tpl.php:337
|
3400 |
msgid "Last Request"
|
3401 |
msgstr ""
|
3402 |
|
3818 |
"images."
|
3819 |
msgstr ""
|
3820 |
|
3821 |
+
#: tpl/img_optm/settings.tpl.php:66 tpl/img_optm/summary.tpl.php:231
|
3822 |
msgid "This is irreversible."
|
3823 |
msgstr ""
|
3824 |
|
3825 |
+
#: tpl/img_optm/settings.tpl.php:67 tpl/img_optm/summary.tpl.php:232
|
3826 |
msgid "You will be unable to Revert Optimization once the backups are deleted!"
|
3827 |
msgstr ""
|
3828 |
|
3863 |
msgid "The image compression quality setting of WordPress out of 100."
|
3864 |
msgstr ""
|
3865 |
|
3866 |
+
#: tpl/img_optm/summary.tpl.php:52 tpl/page_optm/settings_css.tpl.php:121
|
3867 |
#: tpl/page_optm/settings_media.tpl.php:172
|
3868 |
msgid "Current closest Cloud server is %s. Click to redetect."
|
3869 |
msgstr ""
|
3870 |
|
3871 |
+
#: tpl/img_optm/summary.tpl.php:56
|
3872 |
msgid "Optimize images with our cloud server"
|
3873 |
msgstr ""
|
3874 |
|
3875 |
+
#: tpl/img_optm/summary.tpl.php:61
|
3876 |
msgid "You can request a maximum of %s images at once."
|
3877 |
msgstr ""
|
3878 |
|
3879 |
+
#: tpl/img_optm/summary.tpl.php:66
|
3880 |
msgid ""
|
3881 |
"To make sure our server can communicate with your server without any issues "
|
3882 |
"and everything works fine, for the few first requests the amount images "
|
3883 |
"allowed in single request is limited."
|
3884 |
msgstr ""
|
3885 |
|
3886 |
+
#: tpl/img_optm/summary.tpl.php:67
|
3887 |
msgid "Current limit is"
|
3888 |
msgstr ""
|
3889 |
|
3890 |
+
#: tpl/img_optm/summary.tpl.php:79
|
3891 |
msgid "Gather Image Data"
|
3892 |
msgstr ""
|
3893 |
|
3894 |
+
#: tpl/img_optm/summary.tpl.php:79
|
3895 |
msgid "Send Optimization Request"
|
3896 |
msgstr ""
|
3897 |
|
3898 |
+
#: tpl/img_optm/summary.tpl.php:82
|
3899 |
msgid "Only press the button if the pull cron job is disabled."
|
3900 |
msgstr ""
|
3901 |
|
3902 |
+
#: tpl/img_optm/summary.tpl.php:82
|
3903 |
msgid "Images will be pulled automatically if the cron job is running."
|
3904 |
msgstr ""
|
3905 |
|
3906 |
+
#: tpl/img_optm/summary.tpl.php:89
|
3907 |
msgid "Pull Images"
|
3908 |
msgstr ""
|
3909 |
|
3910 |
+
#: tpl/img_optm/summary.tpl.php:95
|
3911 |
msgid "Optimization Status"
|
3912 |
msgstr ""
|
3913 |
|
3914 |
+
#: tpl/img_optm/summary.tpl.php:112
|
3915 |
msgid ""
|
3916 |
"After LiteSpeed's Image Optimization Server finishes optimization, it will "
|
3917 |
"notify your site to pull the optimized images."
|
3918 |
msgstr ""
|
3919 |
|
3920 |
+
#: tpl/img_optm/summary.tpl.php:113
|
3921 |
msgid "This process is automatic."
|
3922 |
msgstr ""
|
3923 |
|
3924 |
+
#: tpl/img_optm/summary.tpl.php:128
|
3925 |
msgid "Last pull initiated by cron at %s."
|
3926 |
msgstr ""
|
3927 |
|
3928 |
+
#: tpl/img_optm/summary.tpl.php:177
|
3929 |
msgid "Storage Optimization"
|
3930 |
msgstr ""
|
3931 |
|
3932 |
+
#: tpl/img_optm/summary.tpl.php:181
|
3933 |
msgid "A backup of each image is saved before it is optimized."
|
3934 |
msgstr ""
|
3935 |
|
3936 |
+
#: tpl/img_optm/summary.tpl.php:188
|
3937 |
msgid "Last calculated"
|
3938 |
msgstr ""
|
3939 |
|
3940 |
+
#: tpl/img_optm/summary.tpl.php:192 tpl/img_optm/summary.tpl.php:243
|
3941 |
msgid "Files"
|
3942 |
msgstr ""
|
3943 |
|
3944 |
+
#: tpl/img_optm/summary.tpl.php:203
|
3945 |
msgid "Calculate Original Image Storage"
|
3946 |
msgstr ""
|
3947 |
|
3948 |
+
#: tpl/img_optm/summary.tpl.php:210
|
3949 |
msgid "Calculate Backups Disk Space"
|
3950 |
msgstr ""
|
3951 |
|
3952 |
#: tpl/img_optm/summary.tpl.php:217
|
3953 |
+
msgid "Thumbnail Size Set"
|
3954 |
+
msgstr ""
|
3955 |
+
|
3956 |
+
#: tpl/img_optm/summary.tpl.php:228
|
3957 |
msgid "Delete all backups of the original images"
|
3958 |
msgstr ""
|
3959 |
|
3960 |
+
#: tpl/img_optm/summary.tpl.php:240
|
3961 |
#: tpl/page_optm/settings_discussion.tpl.php:51
|
3962 |
msgid "Last ran"
|
3963 |
msgstr ""
|
3964 |
|
3965 |
+
#: tpl/img_optm/summary.tpl.php:246
|
3966 |
msgid "Saved"
|
3967 |
msgstr ""
|
3968 |
|
3969 |
+
#: tpl/img_optm/summary.tpl.php:250
|
3970 |
msgid "Are you sure to remove all image backups?"
|
3971 |
msgstr ""
|
3972 |
|
3973 |
+
#: tpl/img_optm/summary.tpl.php:251
|
3974 |
msgid "Remove Original Image Backups"
|
3975 |
msgstr ""
|
3976 |
|
3977 |
+
#: tpl/img_optm/summary.tpl.php:262
|
3978 |
msgid "Image Information"
|
3979 |
msgstr ""
|
3980 |
|
3981 |
+
#: tpl/img_optm/summary.tpl.php:271 tpl/img_optm/summary.tpl.php:298
|
3982 |
msgid "Images total"
|
3983 |
msgstr ""
|
3984 |
|
3985 |
+
#: tpl/img_optm/summary.tpl.php:275 tpl/img_optm/summary.tpl.php:302
|
3986 |
msgid "What is a group?"
|
3987 |
msgstr ""
|
3988 |
|
3989 |
+
#: tpl/img_optm/summary.tpl.php:277 tpl/img_optm/summary.tpl.php:304
|
3990 |
msgid "What is an image group?"
|
3991 |
msgstr ""
|
3992 |
|
3993 |
+
#: tpl/img_optm/summary.tpl.php:282
|
3994 |
msgid "Images not yet gathered"
|
3995 |
msgstr ""
|
3996 |
|
3997 |
+
#: tpl/img_optm/summary.tpl.php:285
|
3998 |
msgid "Congratulations, all gathered!"
|
3999 |
msgstr ""
|
4000 |
|
4001 |
+
#: tpl/img_optm/summary.tpl.php:309
|
4002 |
msgid "Images not yet requested"
|
4003 |
msgstr ""
|
4004 |
|
4005 |
+
#: tpl/img_optm/summary.tpl.php:312
|
4006 |
msgid "Congratulations, all requested!"
|
4007 |
msgstr ""
|
4008 |
|
4009 |
+
#: tpl/img_optm/summary.tpl.php:319
|
4010 |
msgid ""
|
4011 |
"Scan for any new unoptimized image thumbnail sizes and resend necessary "
|
4012 |
"image optimization requests."
|
4013 |
msgstr ""
|
4014 |
|
4015 |
+
#: tpl/img_optm/summary.tpl.php:320
|
4016 |
msgid "Rescan New Thumbnails"
|
4017 |
msgstr ""
|
4018 |
|
4019 |
+
#: tpl/img_optm/summary.tpl.php:328
|
4020 |
msgid "Optimization Summary"
|
4021 |
msgstr ""
|
4022 |
|
4023 |
+
#: tpl/img_optm/summary.tpl.php:331
|
4024 |
msgid "Total Reduction"
|
4025 |
msgstr ""
|
4026 |
|
4027 |
+
#: tpl/img_optm/summary.tpl.php:334
|
4028 |
msgid "Images Pulled"
|
4029 |
msgstr ""
|
4030 |
|
4031 |
+
#: tpl/img_optm/summary.tpl.php:341
|
4032 |
msgid "Results can be checked in <a %s>Media Library</a>."
|
4033 |
msgstr ""
|
4034 |
|
4035 |
+
#: tpl/img_optm/summary.tpl.php:347
|
4036 |
msgid "Optimization Tools"
|
4037 |
msgstr ""
|
4038 |
|
4039 |
+
#: tpl/img_optm/summary.tpl.php:350
|
4040 |
msgid ""
|
4041 |
"You can quickly switch between using original (unoptimized versions) and "
|
4042 |
"optimized image files. It will affect all images on your website, both "
|
4043 |
"regular and webp versions if available."
|
4044 |
msgstr ""
|
4045 |
|
4046 |
+
#: tpl/img_optm/summary.tpl.php:355
|
4047 |
msgid "Use original images (unoptimized) on your site"
|
4048 |
msgstr ""
|
4049 |
|
4050 |
+
#: tpl/img_optm/summary.tpl.php:356
|
4051 |
msgid "Use Original Files"
|
4052 |
msgstr ""
|
4053 |
|
4054 |
+
#: tpl/img_optm/summary.tpl.php:359
|
4055 |
msgid "Switch back to using optimized images on your site"
|
4056 |
msgstr ""
|
4057 |
|
4058 |
+
#: tpl/img_optm/summary.tpl.php:360
|
4059 |
msgid "Use Optimized Files"
|
4060 |
msgstr ""
|
4061 |
|
4062 |
+
#: tpl/img_optm/summary.tpl.php:368
|
4063 |
msgid "Are you sure to destroy all optimized images?"
|
4064 |
msgstr ""
|
4065 |
|
4066 |
+
#: tpl/img_optm/summary.tpl.php:369
|
4067 |
msgid "Destroy All Optimization Data"
|
4068 |
msgstr ""
|
4069 |
|
4070 |
+
#: tpl/img_optm/summary.tpl.php:373
|
4071 |
msgid ""
|
4072 |
"Remove all previous image optimization requests/results, revert completed "
|
4073 |
"optimizations, and delete all optimization files."
|
4878 |
msgid "Report"
|
4879 |
msgstr ""
|
4880 |
|
4881 |
+
#: tpl/toolbox/entry.tpl.php:23 tpl/toolbox/settings-debug.tpl.php:10
|
4882 |
msgid "Debug Settings"
|
4883 |
msgstr ""
|
4884 |
|
4885 |
+
#: tpl/toolbox/entry.tpl.php:24
|
4886 |
msgid "Log View"
|
4887 |
msgstr ""
|
4888 |
|
4889 |
+
#: tpl/toolbox/entry.tpl.php:25
|
4890 |
msgid "Beta Test"
|
4891 |
msgstr ""
|
4892 |
|
4893 |
+
#: tpl/toolbox/entry.tpl.php:32
|
4894 |
msgid "LiteSpeed Cache Toolbox"
|
4895 |
msgstr ""
|
4896 |
|
litespeed-cache.php
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
* Plugin Name: LiteSpeed Cache
|
15 |
* Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
|
16 |
* Description: High-performance page caching and site optimization from LiteSpeed
|
17 |
-
* Version: 3.
|
18 |
* Author: LiteSpeed Technologies
|
19 |
* Author URI: https://www.litespeedtech.com
|
20 |
* License: GPLv3
|
@@ -44,7 +44,7 @@ if ( class_exists( 'LiteSpeed\Core' ) || defined( 'LSCWP_DIR' ) ) {
|
|
44 |
return;
|
45 |
}
|
46 |
|
47 |
-
! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '3.
|
48 |
|
49 |
! defined( 'LSCWP_CONTENT_DIR' ) && define( 'LSCWP_CONTENT_DIR', WP_CONTENT_DIR ) ;
|
50 |
! defined( 'LSCWP_DIR' ) && define( 'LSCWP_DIR', __DIR__ . '/' ) ;// Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU
|
14 |
* Plugin Name: LiteSpeed Cache
|
15 |
* Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
|
16 |
* Description: High-performance page caching and site optimization from LiteSpeed
|
17 |
+
* Version: 3.1
|
18 |
* Author: LiteSpeed Technologies
|
19 |
* Author URI: https://www.litespeedtech.com
|
20 |
* License: GPLv3
|
44 |
return;
|
45 |
}
|
46 |
|
47 |
+
! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '3.1' );
|
48 |
|
49 |
! defined( 'LSCWP_CONTENT_DIR' ) && define( 'LSCWP_CONTENT_DIR', WP_CONTENT_DIR ) ;
|
50 |
! defined( 'LSCWP_DIR' ) && define( 'LSCWP_DIR', __DIR__ . '/' ) ;// Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: LiteSpeedTech
|
|
3 |
Tags: caching, optimize, performance, pagespeed, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 5.4.1
|
6 |
-
Stable tag: 3.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
9 |
|
@@ -244,6 +244,20 @@ The vast majority of plugins and themes are compatible with LiteSpeed Cache. The
|
|
244 |
|
245 |
== Changelog ==
|
246 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
= 3.0.9 - May 13 2020 =
|
248 |
* **Purge** Comment cache can be successfully purged now.
|
249 |
* **Data** Better MySQL charset support for crawler/image optimize table creation. (@Roshan Jonah)
|
3 |
Tags: caching, optimize, performance, pagespeed, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 5.4.1
|
6 |
+
Stable tag: 3.1
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
9 |
|
244 |
|
245 |
== Changelog ==
|
246 |
|
247 |
+
= 3.1 - May 20 2020 =
|
248 |
+
* 🌱**Network** Added Debug settings to network level when on network.
|
249 |
+
* 🐞**Purge** Network now can purge all.
|
250 |
+
* 🐞**Network** Fixed issue where saving the network primary site settings failed.
|
251 |
+
* **Network** Moved Beta Test to network level when on network.
|
252 |
+
* 🐞**Cache** Fixed issue in admin where new post editor was wrongly cached for non-admin roles. (@TEKFused)
|
253 |
+
* 🐞**Data** Fixed issue with crawler & img_optm table creation failure. (@berdini @piercand)
|
254 |
+
* 🐞**Core** Improved plugin activation compatibility on Windows 10 #224 (@greenphp)
|
255 |
+
* **Core** Improved compatibility for .htaccess path search.
|
256 |
+
* **Object** Catch RedisException. (@elparts)
|
257 |
+
* Fixed Script URI issue in 3.0.9 #223 (@aonsyed)
|
258 |
+
* **Image Optimize** Show thumbnail size set list in image optimization summary. (@Johnny Nguyen)
|
259 |
+
* **Debug** Parameters will now be logged.
|
260 |
+
|
261 |
= 3.0.9 - May 13 2020 =
|
262 |
* **Purge** Comment cache can be successfully purged now.
|
263 |
* **Data** Better MySQL charset support for crawler/image optimize table creation. (@Roshan Jonah)
|
src/admin-settings.cls.php
CHANGED
@@ -223,7 +223,7 @@ class Admin_Settings extends Base
|
|
223 |
case self::O_CRAWLER_EXC_CPT:
|
224 |
if ( $data ) {
|
225 |
$data = Utility::sanitize_lines( $data );
|
226 |
-
$ori = array_diff( get_post_types(
|
227 |
$data = array_intersect( $data, $ori );
|
228 |
}
|
229 |
break;
|
223 |
case self::O_CRAWLER_EXC_CPT:
|
224 |
if ( $data ) {
|
225 |
$data = Utility::sanitize_lines( $data );
|
226 |
+
$ori = array_diff( get_post_types(), array( 'post', 'page' ) );
|
227 |
$data = array_intersect( $data, $ori );
|
228 |
}
|
229 |
break;
|
src/admin.cls.php
CHANGED
@@ -70,9 +70,10 @@ class Admin extends Instance
|
|
70 |
* @since 1.0.0
|
71 |
* @access public
|
72 |
*/
|
73 |
-
public function admin_init()
|
74 |
-
|
75 |
-
|
|
|
76 |
|
77 |
// Terminate if user doesn't have the access to settings
|
78 |
if( is_network_admin() ) {
|
@@ -96,8 +97,6 @@ class Admin extends Instance
|
|
96 |
|
97 |
do_action( 'litspeed_after_admin_init' ) ;
|
98 |
|
99 |
-
Control::set_nocache( 'Admin page' ) ;
|
100 |
-
|
101 |
if ( Router::esi_enabled() ) {
|
102 |
add_action( 'in_widget_form', array( $this->display, 'show_widget_edit' ), 100, 3 ) ;
|
103 |
add_filter( 'widget_update_callback', __NAMESPACE__ . '\Admin_Settings::validate_widget_save', 10, 4 ) ;
|
70 |
* @since 1.0.0
|
71 |
* @access public
|
72 |
*/
|
73 |
+
public function admin_init() {
|
74 |
+
Control::set_nocache( 'Admin page' );
|
75 |
+
|
76 |
+
$this->_proceed_admin_action();
|
77 |
|
78 |
// Terminate if user doesn't have the access to settings
|
79 |
if( is_network_admin() ) {
|
97 |
|
98 |
do_action( 'litspeed_after_admin_init' ) ;
|
99 |
|
|
|
|
|
100 |
if ( Router::esi_enabled() ) {
|
101 |
add_action( 'in_widget_form', array( $this->display, 'show_widget_edit' ), 100, 3 ) ;
|
102 |
add_filter( 'widget_update_callback', __NAMESPACE__ . '\Admin_Settings::validate_widget_save', 10, 4 ) ;
|
src/base.cls.php
CHANGED
@@ -583,6 +583,17 @@ class Base extends Instance
|
|
583 |
self::O_OBJECT_GLOBAL_GROUPS => array(),
|
584 |
self::O_OBJECT_NON_PERSISTENT_GROUPS => array(),
|
585 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
586 |
self::O_IMG_OPTM_WEBP_REPLACE => false,
|
587 |
|
588 |
self::O_MISC_HTACCESS_FRONT => '',
|
@@ -1046,6 +1057,10 @@ class Base extends Instance
|
|
1046 |
{
|
1047 |
$summary = self::get_option( '_summary', array() );
|
1048 |
|
|
|
|
|
|
|
|
|
1049 |
if ( ! $field ) {
|
1050 |
return $summary;
|
1051 |
}
|
583 |
self::O_OBJECT_GLOBAL_GROUPS => array(),
|
584 |
self::O_OBJECT_NON_PERSISTENT_GROUPS => array(),
|
585 |
|
586 |
+
// Debug
|
587 |
+
self::O_DEBUG_DISABLE_ALL => false,
|
588 |
+
self::O_DEBUG => false,
|
589 |
+
self::O_DEBUG_IPS => array(),
|
590 |
+
self::O_DEBUG_LEVEL => false,
|
591 |
+
self::O_DEBUG_FILESIZE => 0,
|
592 |
+
self::O_DEBUG_COOKIE => false,
|
593 |
+
self::O_DEBUG_COLLAPS_QS => false,
|
594 |
+
self::O_DEBUG_INC => array(),
|
595 |
+
self::O_DEBUG_EXC => array(),
|
596 |
+
|
597 |
self::O_IMG_OPTM_WEBP_REPLACE => false,
|
598 |
|
599 |
self::O_MISC_HTACCESS_FRONT => '',
|
1057 |
{
|
1058 |
$summary = self::get_option( '_summary', array() );
|
1059 |
|
1060 |
+
if ( ! is_array( $summary ) ) {
|
1061 |
+
$summary = array();
|
1062 |
+
}
|
1063 |
+
|
1064 |
if ( ! $field ) {
|
1065 |
return $summary;
|
1066 |
}
|
src/conf.cls.php
CHANGED
@@ -431,6 +431,18 @@ class Conf extends Base
|
|
431 |
return $instance->_options[ $id ];
|
432 |
}
|
433 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
defined( 'LSCWP_LOG' ) && Debug2::debug( '[Conf] Invalid option ID ' . $id );
|
435 |
|
436 |
return null;
|
@@ -575,9 +587,7 @@ class Conf extends Base
|
|
575 |
* @since 3.0
|
576 |
* @access public
|
577 |
*/
|
578 |
-
public function network_update( $id, $val )
|
579 |
-
{
|
580 |
-
|
581 |
if ( ! array_key_exists( $id, self::$_default_site_options ) ) {
|
582 |
defined( 'LSCWP_LOG' ) && Debug2::debug( '[Conf] Invalid network option ID ' . $id );
|
583 |
return ;
|
431 |
return $instance->_options[ $id ];
|
432 |
}
|
433 |
|
434 |
+
if ( isset( $instance->_site_options[ $id ] ) ) {
|
435 |
+
if ( ! $ori ) {
|
436 |
+
$val = $instance->const_overwritten( $id );
|
437 |
+
if ( $val !== null ) {
|
438 |
+
defined( 'LSCWP_LOG' ) && Debug2::debug( '[Conf] 🏛️ const option ' . $id . '=' . var_export( $val, true ) ) ;
|
439 |
+
return $val;
|
440 |
+
}
|
441 |
+
}
|
442 |
+
|
443 |
+
return $instance->_site_options[ $id ];
|
444 |
+
}
|
445 |
+
|
446 |
defined( 'LSCWP_LOG' ) && Debug2::debug( '[Conf] Invalid option ID ' . $id );
|
447 |
|
448 |
return null;
|
587 |
* @since 3.0
|
588 |
* @access public
|
589 |
*/
|
590 |
+
public function network_update( $id, $val ) {
|
|
|
|
|
591 |
if ( ! array_key_exists( $id, self::$_default_site_options ) ) {
|
592 |
defined( 'LSCWP_LOG' ) && Debug2::debug( '[Conf] Invalid network option ID ' . $id );
|
593 |
return ;
|
src/data_structure/crawler.sql
CHANGED
@@ -4,5 +4,5 @@
|
|
4 |
`reason` text NOT NULL COMMENT 'response code, comma separated',
|
5 |
`mtime` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
6 |
PRIMARY KEY (`id`),
|
7 |
-
KEY `url` (`url`(
|
8 |
KEY `res` (`res`)
|
4 |
`reason` text NOT NULL COMMENT 'response code, comma separated',
|
5 |
`mtime` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
6 |
PRIMARY KEY (`id`),
|
7 |
+
KEY `url` (`url`(191)),
|
8 |
KEY `res` (`res`)
|
src/data_structure/crawler_blacklist.sql
CHANGED
@@ -4,5 +4,5 @@
|
|
4 |
`reason` text NOT NULL COMMENT 'Reason for blacklist, comma separated',
|
5 |
`mtime` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
6 |
PRIMARY KEY (`id`),
|
7 |
-
KEY `url` (`url`(
|
8 |
KEY `res` (`res`)
|
4 |
`reason` text NOT NULL COMMENT 'Reason for blacklist, comma separated',
|
5 |
`mtime` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
6 |
PRIMARY KEY (`id`),
|
7 |
+
KEY `url` (`url`(191)),
|
8 |
KEY `res` (`res`)
|
src/data_structure/img_optming.sql
CHANGED
@@ -6,4 +6,4 @@
|
|
6 |
PRIMARY KEY (`id`),
|
7 |
KEY `post_id` (`post_id`),
|
8 |
KEY `optm_status` (`optm_status`),
|
9 |
-
KEY `src` (`src`(
|
6 |
PRIMARY KEY (`id`),
|
7 |
KEY `post_id` (`post_id`),
|
8 |
KEY `optm_status` (`optm_status`),
|
9 |
+
KEY `src` (`src`(191))
|
src/debug2.cls.php
CHANGED
@@ -401,7 +401,7 @@ class Debug2 extends Instance
|
|
401 |
{
|
402 |
$msg = '' ;
|
403 |
|
404 |
-
$trace = version_compare( PHP_VERSION, '5.4.0', '<' ) ? debug_backtrace(
|
405 |
for ( $i=2 ; $i <= $backtrace_limit + 2 ; $i++ ) {// 0st => _backtrace_info(), 1st => push()
|
406 |
if ( empty( $trace[ $i ][ 'class' ] ) ) {
|
407 |
if ( empty( $trace[ $i ][ 'file' ] ) ) {
|
@@ -410,11 +410,25 @@ class Debug2 extends Instance
|
|
410 |
$log = "\n" . $trace[ $i ][ 'file' ] ;
|
411 |
}
|
412 |
else {
|
413 |
-
if ( $trace[$i]['class'] ==
|
414 |
continue ;
|
415 |
}
|
416 |
|
417 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
418 |
}
|
419 |
if ( ! empty( $trace[$i-1]['line'] ) ) {
|
420 |
$log .= '@' . $trace[$i-1]['line'] ;
|
401 |
{
|
402 |
$msg = '' ;
|
403 |
|
404 |
+
$trace = version_compare( PHP_VERSION, '5.4.0', '<' ) ? debug_backtrace() : debug_backtrace( false, $backtrace_limit + 3 );
|
405 |
for ( $i=2 ; $i <= $backtrace_limit + 2 ; $i++ ) {// 0st => _backtrace_info(), 1st => push()
|
406 |
if ( empty( $trace[ $i ][ 'class' ] ) ) {
|
407 |
if ( empty( $trace[ $i ][ 'file' ] ) ) {
|
410 |
$log = "\n" . $trace[ $i ][ 'file' ] ;
|
411 |
}
|
412 |
else {
|
413 |
+
if ( $trace[$i]['class'] == __CLASS__ ) {
|
414 |
continue ;
|
415 |
}
|
416 |
|
417 |
+
$args = '';
|
418 |
+
if ( ! empty( $trace[ $i ][ 'args' ] ) ) {
|
419 |
+
foreach ( $trace[ $i ][ 'args' ] as $v ) {
|
420 |
+
if ( is_array( $v ) ) {
|
421 |
+
$v = 'ARRAY';
|
422 |
+
}
|
423 |
+
if ( is_string( $v ) || is_numeric( $v ) ) {
|
424 |
+
$args .= $v . ',';
|
425 |
+
}
|
426 |
+
}
|
427 |
+
|
428 |
+
$args = substr( $args, 0, -1 );
|
429 |
+
}
|
430 |
+
|
431 |
+
$log = str_replace('Core', 'LSC', $trace[$i]['class']) . $trace[$i]['type'] . $trace[$i]['function'] . '(' . $args . ')';
|
432 |
}
|
433 |
if ( ! empty( $trace[$i-1]['line'] ) ) {
|
434 |
$log .= '@' . $trace[$i-1]['line'] ;
|
src/htaccess.cls.php
CHANGED
@@ -178,26 +178,27 @@ class Htaccess extends Instance
|
|
178 |
*
|
179 |
* As dirname() strips the ending '/', paths passed in must exclude the final '/'
|
180 |
*
|
181 |
-
* If can't find, return false
|
182 |
-
*
|
183 |
* @since 1.0.11
|
184 |
* @access private
|
185 |
-
* @param string $start_path The first directory level to search.
|
186 |
-
* @return string The deepest path where .htaccess exists, False if not.
|
187 |
*/
|
188 |
-
private function _htaccess_search( $start_path )
|
189 |
-
{
|
190 |
while ( ! file_exists( $start_path . '/.htaccess' ) ) {
|
191 |
if ( $start_path === '/' || ! $start_path ) {
|
192 |
-
return false
|
|
|
|
|
|
|
|
|
193 |
}
|
194 |
-
|
195 |
-
|
|
|
196 |
}
|
197 |
-
|
|
|
198 |
}
|
199 |
|
200 |
-
return $start_path
|
201 |
}
|
202 |
|
203 |
/**
|
178 |
*
|
179 |
* As dirname() strips the ending '/', paths passed in must exclude the final '/'
|
180 |
*
|
|
|
|
|
181 |
* @since 1.0.11
|
182 |
* @access private
|
|
|
|
|
183 |
*/
|
184 |
+
private function _htaccess_search( $start_path ) {
|
|
|
185 |
while ( ! file_exists( $start_path . '/.htaccess' ) ) {
|
186 |
if ( $start_path === '/' || ! $start_path ) {
|
187 |
+
return false;
|
188 |
+
}
|
189 |
+
|
190 |
+
if ( ! empty( $_SERVER[ 'DOCUMENT_ROOT' ] ) && wp_normalize_path( $start_path ) === wp_normalize_path( $_SERVER[ 'DOCUMENT_ROOT' ] ) ) {
|
191 |
+
return false;
|
192 |
}
|
193 |
+
|
194 |
+
if ( dirname( $start_path ) === $start_path ) {
|
195 |
+
return false;
|
196 |
}
|
197 |
+
|
198 |
+
$start_path = dirname( $start_path );
|
199 |
}
|
200 |
|
201 |
+
return $start_path;
|
202 |
}
|
203 |
|
204 |
/**
|
src/img-optm.cls.php
CHANGED
@@ -860,7 +860,7 @@ class Img_Optm extends Base
|
|
860 |
file_put_contents( $local_file . '.tmp', $response[ 'body' ] );
|
861 |
|
862 |
if ( ! file_exists( $local_file . '.tmp' ) || ! filesize( $local_file . '.tmp' ) || md5_file( $local_file . '.tmp' ) !== $server_info[ 'ori_md5' ] ) {
|
863 |
-
Debug2::debug( '[Img_Optm] ❌ Failed to pull optimized img: file md5
|
864 |
|
865 |
// Update status to failed
|
866 |
$q = "UPDATE `$this->_table_img_optm` SET optm_status = %d WHERE id = %d ";
|
@@ -869,7 +869,7 @@ class Img_Optm extends Base
|
|
869 |
$q = "DELETE FROM `$this->_table_img_optming` WHERE id = %d ";
|
870 |
$wpdb->query( $wpdb->prepare( $q, $row_img->id ) );
|
871 |
|
872 |
-
$msg = __( 'Pulled image md5
|
873 |
Admin_Display::error( $msg );
|
874 |
return;
|
875 |
}
|
@@ -921,7 +921,7 @@ class Img_Optm extends Base
|
|
921 |
file_put_contents( $local_file . '.webp', $response[ 'body' ] );
|
922 |
|
923 |
if ( ! file_exists( $local_file . '.webp' ) || ! filesize( $local_file . '.webp' ) || md5_file( $local_file . '.webp' ) !== $server_info[ 'webp_md5' ] ) {
|
924 |
-
Debug2::debug( '[Img_Optm] ❌ Failed to pull optimized webp img: file md5
|
925 |
|
926 |
// update status to failed
|
927 |
$q = "UPDATE `$this->_table_img_optm` SET optm_status = %d WHERE id = %d ";
|
@@ -930,7 +930,7 @@ class Img_Optm extends Base
|
|
930 |
$q = "DELETE FROM `$this->_table_img_optming` WHERE id = %d ";
|
931 |
$wpdb->query( $wpdb->prepare( $q, $row_img->id ) );
|
932 |
|
933 |
-
$msg = __( 'Pulled WebP image md5
|
934 |
Admin_Display::error( $msg );
|
935 |
return;
|
936 |
}
|
860 |
file_put_contents( $local_file . '.tmp', $response[ 'body' ] );
|
861 |
|
862 |
if ( ! file_exists( $local_file . '.tmp' ) || ! filesize( $local_file . '.tmp' ) || md5_file( $local_file . '.tmp' ) !== $server_info[ 'ori_md5' ] ) {
|
863 |
+
Debug2::debug( '[Img_Optm] ❌ Failed to pull optimized img: file md5 mismatch [url] ' . $server_info[ 'server' ] . '/' . $server_info[ 'ori' ] . ' [server_md5] ' . $server_info[ 'ori_md5' ] );
|
864 |
|
865 |
// Update status to failed
|
866 |
$q = "UPDATE `$this->_table_img_optm` SET optm_status = %d WHERE id = %d ";
|
869 |
$q = "DELETE FROM `$this->_table_img_optming` WHERE id = %d ";
|
870 |
$wpdb->query( $wpdb->prepare( $q, $row_img->id ) );
|
871 |
|
872 |
+
$msg = __( 'Pulled image md5 does not match the notified image md5.', 'litespeed-cache' );
|
873 |
Admin_Display::error( $msg );
|
874 |
return;
|
875 |
}
|
921 |
file_put_contents( $local_file . '.webp', $response[ 'body' ] );
|
922 |
|
923 |
if ( ! file_exists( $local_file . '.webp' ) || ! filesize( $local_file . '.webp' ) || md5_file( $local_file . '.webp' ) !== $server_info[ 'webp_md5' ] ) {
|
924 |
+
Debug2::debug( '[Img_Optm] ❌ Failed to pull optimized webp img: file md5 mismatch, server md5: ' . $server_info[ 'webp_md5' ] );
|
925 |
|
926 |
// update status to failed
|
927 |
$q = "UPDATE `$this->_table_img_optm` SET optm_status = %d WHERE id = %d ";
|
930 |
$q = "DELETE FROM `$this->_table_img_optming` WHERE id = %d ";
|
931 |
$wpdb->query( $wpdb->prepare( $q, $row_img->id ) );
|
932 |
|
933 |
+
$msg = __( 'Pulled WebP image md5 does not match the notified WebP image md5.', 'litespeed-cache' );
|
934 |
Admin_Display::error( $msg );
|
935 |
return;
|
936 |
}
|
src/object-cache.cls.php
CHANGED
@@ -485,7 +485,11 @@ class Object_Cache
|
|
485 |
$ttl = $expire ?: $this->_cfg_life ;
|
486 |
|
487 |
if ( $this->_oc_driver == 'Redis' ) {
|
488 |
-
|
|
|
|
|
|
|
|
|
489 |
}
|
490 |
else {
|
491 |
$res = $this->_conn->set( $key, $data, $ttl ) ;
|
485 |
$ttl = $expire ?: $this->_cfg_life ;
|
486 |
|
487 |
if ( $this->_oc_driver == 'Redis' ) {
|
488 |
+
try {
|
489 |
+
$res = $this->_conn->setEx( $key, $ttl, $data ) ;
|
490 |
+
} catch ( \RedisException $ex ) {
|
491 |
+
throw new \Exception( $ex->getMessage(), $ex->getCode(), $ex );
|
492 |
+
}
|
493 |
}
|
494 |
else {
|
495 |
$res = $this->_conn->set( $key, $data, $ttl ) ;
|
src/router.cls.php
CHANGED
@@ -39,7 +39,7 @@ class Router extends Instance
|
|
39 |
|
40 |
const TYPE = 'litespeed_type';
|
41 |
|
42 |
-
private static $_esi_enabled
|
43 |
private static $_is_ajax ;
|
44 |
private static $_is_logged_in ;
|
45 |
private static $_ip ;
|
@@ -521,7 +521,6 @@ class Router extends Instance
|
|
521 |
}
|
522 |
return ;
|
523 |
|
524 |
-
case self::ACTION_PURGE:
|
525 |
case self::ACTION_PLACEHOLDER:
|
526 |
case self::ACTION_AVATAR:
|
527 |
case self::ACTION_IMG_OPTM:
|
@@ -541,11 +540,12 @@ class Router extends Instance
|
|
541 |
}
|
542 |
return ;
|
543 |
|
|
|
544 |
case self::ACTION_DEBUG2:
|
545 |
if ( $_can_network_option || $_can_option ) {
|
546 |
-
self::$_action = $action
|
547 |
}
|
548 |
-
return
|
549 |
|
550 |
case Core::ACTION_DISMISS:
|
551 |
/**
|
@@ -654,28 +654,32 @@ class Router extends Instance
|
|
654 |
*/
|
655 |
public static function serve_static()
|
656 |
{
|
|
|
|
|
|
|
|
|
657 |
if ( strpos( $_SERVER[ 'SCRIPT_URI' ], LITESPEED_STATIC_URL . '/' ) !== 0 ) {
|
658 |
-
return
|
659 |
}
|
660 |
|
661 |
-
$path = substr( $_SERVER[ 'SCRIPT_URI' ], strlen( LITESPEED_STATIC_URL . '/' ) )
|
662 |
-
$path = explode( '/', $path, 2 )
|
663 |
|
664 |
if ( empty( $path[ 0 ] ) || empty( $path[ 1 ] ) ) {
|
665 |
-
return
|
666 |
}
|
667 |
|
668 |
switch ( $path[ 0 ] ) {
|
669 |
case 'avatar' :
|
670 |
-
Avatar::get_instance()->serve_satic( $path[ 1 ] )
|
671 |
-
break
|
672 |
|
673 |
case 'cssjs' :
|
674 |
-
Optimize::get_instance()->serve_satic( $path[ 1 ] )
|
675 |
-
break
|
676 |
|
677 |
default :
|
678 |
-
break
|
679 |
}
|
680 |
|
681 |
}
|
39 |
|
40 |
const TYPE = 'litespeed_type';
|
41 |
|
42 |
+
private static $_esi_enabled;
|
43 |
private static $_is_ajax ;
|
44 |
private static $_is_logged_in ;
|
45 |
private static $_ip ;
|
521 |
}
|
522 |
return ;
|
523 |
|
|
|
524 |
case self::ACTION_PLACEHOLDER:
|
525 |
case self::ACTION_AVATAR:
|
526 |
case self::ACTION_IMG_OPTM:
|
540 |
}
|
541 |
return ;
|
542 |
|
543 |
+
case self::ACTION_PURGE:
|
544 |
case self::ACTION_DEBUG2:
|
545 |
if ( $_can_network_option || $_can_option ) {
|
546 |
+
self::$_action = $action;
|
547 |
}
|
548 |
+
return;
|
549 |
|
550 |
case Core::ACTION_DISMISS:
|
551 |
/**
|
654 |
*/
|
655 |
public static function serve_static()
|
656 |
{
|
657 |
+
if ( empty( $_SERVER[ 'SCRIPT_URI' ] ) ) {
|
658 |
+
return;
|
659 |
+
}
|
660 |
+
|
661 |
if ( strpos( $_SERVER[ 'SCRIPT_URI' ], LITESPEED_STATIC_URL . '/' ) !== 0 ) {
|
662 |
+
return;
|
663 |
}
|
664 |
|
665 |
+
$path = substr( $_SERVER[ 'SCRIPT_URI' ], strlen( LITESPEED_STATIC_URL . '/' ) );
|
666 |
+
$path = explode( '/', $path, 2 );
|
667 |
|
668 |
if ( empty( $path[ 0 ] ) || empty( $path[ 1 ] ) ) {
|
669 |
+
return;
|
670 |
}
|
671 |
|
672 |
switch ( $path[ 0 ] ) {
|
673 |
case 'avatar' :
|
674 |
+
Avatar::get_instance()->serve_satic( $path[ 1 ] );
|
675 |
+
break;
|
676 |
|
677 |
case 'cssjs' :
|
678 |
+
Optimize::get_instance()->serve_satic( $path[ 1 ] );
|
679 |
+
break;
|
680 |
|
681 |
default :
|
682 |
+
break;
|
683 |
}
|
684 |
|
685 |
}
|
src/task.cls.php
CHANGED
@@ -91,14 +91,14 @@ class Task extends Instance
|
|
91 |
public static function try_clean( $id )
|
92 |
{
|
93 |
// Clean v2's leftover cron ( will remove in v3.1 )
|
94 |
-
foreach ( wp_get_ready_cron_jobs() as $hooks ) {
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
}
|
102 |
|
103 |
if ( $id && ! empty( self::$_triggers[ $id ] ) ) {
|
104 |
if ( ! Conf::val( $id ) || ( $id == Base::O_CRAWLER && ! Router::can_crawl() ) ) {
|
91 |
public static function try_clean( $id )
|
92 |
{
|
93 |
// Clean v2's leftover cron ( will remove in v3.1 )
|
94 |
+
// foreach ( wp_get_ready_cron_jobs() as $hooks ) {
|
95 |
+
// foreach ( $hooks as $hook => $v ) {
|
96 |
+
// if ( strpos( $hook, 'litespeed_' ) === 0 && ( substr( $hook, -8 ) === '_trigger' || strpos( $hook, 'litespeed_task_' ) !== 0 ) ) {
|
97 |
+
// Debug2::debug( '⏰ Cron clear legacy [hook] ' . $hook );
|
98 |
+
// wp_clear_scheduled_hook( $hook );
|
99 |
+
// }
|
100 |
+
// }
|
101 |
+
// }
|
102 |
|
103 |
if ( $id && ! empty( self::$_triggers[ $id ] ) ) {
|
104 |
if ( ! Conf::val( $id ) || ( $id == Base::O_CRAWLER && ! Router::can_crawl() ) ) {
|
tpl/crawler/settings-sitemap.tpl.php
CHANGED
@@ -102,7 +102,7 @@ $this->form_action();
|
|
102 |
<div class="litespeed-callout notice notice-warning inline">
|
103 |
<h4><?php echo __('Available Custom Post Type','litespeed-cache'); ?></h4>
|
104 |
<p>
|
105 |
-
<?php echo implode('<br />', array_diff(get_post_types(
|
106 |
</p>
|
107 |
</div>
|
108 |
</div>
|
102 |
<div class="litespeed-callout notice notice-warning inline">
|
103 |
<h4><?php echo __('Available Custom Post Type','litespeed-cache'); ?></h4>
|
104 |
<p>
|
105 |
+
<?php echo implode('<br />', array_diff(get_post_types(), array('post', 'page'))); ?>
|
106 |
</p>
|
107 |
</div>
|
108 |
</div>
|
tpl/img_optm/summary.tpl.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
namespace LiteSpeed;
|
3 |
defined( 'WPINC' ) || exit;
|
|
|
4 |
|
5 |
$closest_server = Cloud::get_summary( 'server.' . Cloud::SVC_IMG_OPTM );
|
6 |
$usage_cloud = Cloud::get_summary( 'usage.' . Cloud::SVC_IMG_OPTM );
|
@@ -212,6 +213,16 @@ if ( ! empty( $img_count[ 'img.' . Img_Optm::STATUS_ERR_FETCH ] ) ) {
|
|
212 |
|
213 |
</div>
|
214 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
<hr class="litespeed-hr-with-space">
|
216 |
<div>
|
217 |
<h4><?php echo __( 'Delete all backups of the original images', 'litespeed-cache' ) ; ?></h4>
|
1 |
<?php
|
2 |
namespace LiteSpeed;
|
3 |
defined( 'WPINC' ) || exit;
|
4 |
+
global $_wp_additional_image_sizes;
|
5 |
|
6 |
$closest_server = Cloud::get_summary( 'server.' . Cloud::SVC_IMG_OPTM );
|
7 |
$usage_cloud = Cloud::get_summary( 'usage.' . Cloud::SVC_IMG_OPTM );
|
213 |
|
214 |
</div>
|
215 |
|
216 |
+
<div>
|
217 |
+
<h4><?php echo __( 'Thumbnail Size Set', 'litespeed-cache' ) ; ?></h4>
|
218 |
+
<div class="litespeed-desc litespeed-left20">
|
219 |
+
<?php foreach ( $_wp_additional_image_sizes as $title => $size ) {
|
220 |
+
echo "<div>$title ( " . ( $size[ 'width' ] ? $size[ 'width' ] . 'px' : '*' ) . ' x ' . ( $size[ 'height' ] ? $size[ 'height' ] . 'px' : '*' ) . ' )</div>';
|
221 |
+
} ; ?>
|
222 |
+
</div>
|
223 |
+
|
224 |
+
</div>
|
225 |
+
|
226 |
<hr class="litespeed-hr-with-space">
|
227 |
<div>
|
228 |
<h4><?php echo __( 'Delete all backups of the original images', 'litespeed-cache' ) ; ?></h4>
|
tpl/toolbox/entry.tpl.php
CHANGED
@@ -17,10 +17,14 @@ if ( ! $this->_is_multisite || $this->_is_network_admin ) {
|
|
17 |
if ( ! $this->_is_network_admin ) {
|
18 |
$menu_list[ 'heartbeat' ] = __( 'Heartbeat', 'litespeed-cache' ); // todo: will add this to network level later
|
19 |
$menu_list[ 'report' ] = __( 'Report', 'litespeed-cache' );
|
|
|
|
|
|
|
20 |
$menu_list[ 'settings-debug' ] = __( 'Debug Settings', 'litespeed-cache' );
|
21 |
$menu_list[ 'log_viewer' ] = __( 'Log View', 'litespeed-cache' );
|
22 |
$menu_list[ 'beta_test' ] = __( 'Beta Test', 'litespeed-cache' );
|
23 |
}
|
|
|
24 |
?>
|
25 |
|
26 |
<div class="wrap">
|
17 |
if ( ! $this->_is_network_admin ) {
|
18 |
$menu_list[ 'heartbeat' ] = __( 'Heartbeat', 'litespeed-cache' ); // todo: will add this to network level later
|
19 |
$menu_list[ 'report' ] = __( 'Report', 'litespeed-cache' );
|
20 |
+
}
|
21 |
+
|
22 |
+
if ( ! $this->_is_multisite || $this->_is_network_admin ) {
|
23 |
$menu_list[ 'settings-debug' ] = __( 'Debug Settings', 'litespeed-cache' );
|
24 |
$menu_list[ 'log_viewer' ] = __( 'Log View', 'litespeed-cache' );
|
25 |
$menu_list[ 'beta_test' ] = __( 'Beta Test', 'litespeed-cache' );
|
26 |
}
|
27 |
+
|
28 |
?>
|
29 |
|
30 |
<div class="wrap">
|
tpl/toolbox/settings-debug.tpl.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
namespace LiteSpeed ;
|
3 |
defined( 'WPINC' ) || exit ;
|
4 |
|
5 |
-
$this->form_action()
|
6 |
?>
|
7 |
|
8 |
|
2 |
namespace LiteSpeed ;
|
3 |
defined( 'WPINC' ) || exit ;
|
4 |
|
5 |
+
$this->form_action( $this->_is_network_admin ? Router::ACTION_SAVE_SETTINGS_NETWORK : false );
|
6 |
?>
|
7 |
|
8 |
|