OMGF | GDPR/DSVGO Compliant, Faster Google Fonts. Easy. - Version 4.5.16

Version Description

| February 2nd, 2022 = * Fixed: WP 5.9 welcome banner removed from Help section. * Added: Basic debugging throughout the plugin (can be enable by setting the OMGF_DEBUG_MODE constant to true); * Fixed: Updated handle was overwritten by empty value if cache key wasn't defined. * Added: More user friendly error messages. * Fixed: "Handle not provided" error should not kill the entire Download API process (post OMGF v4) * Pro Feature: Fallback Font Stacks can now Replace an entire Google Fonts font-family.

Download this release

Release Info

Developer DaanvandenBergh
Plugin Icon 128x128 OMGF | GDPR/DSVGO Compliant, Faster Google Fonts. Easy.
Version 4.5.16
Comparing to
See all releases

Code changes from version 4.5.15 to 4.5.16

assets/css/omgf-admin.css CHANGED
@@ -25,30 +25,25 @@
25
  white-space: nowrap;
26
  padding: 1px 10px !important;
27
  }
28
-
29
  .omgf .button-cancel:hover {
30
  cursor: pointer;
31
  background: #d54e21;
32
  color: #fff;
33
  border-color: #d54e21;
34
  }
35
-
36
  /**
37
  * Navigation
38
  */
39
  .omgf-nav {
40
  padding: 1em 0 1.5em;
41
  }
42
-
43
  .omgf-nav a {
44
  cursor: pointer;
45
  }
46
-
47
  .omgf-nav .dashicons-before:before {
48
  margin-right: 0.25em;
49
  line-height: 1.15em;
50
  }
51
-
52
  .omgf-optimize-fonts-container {
53
  text-align: center;
54
  padding: 25px 50px;
@@ -57,7 +52,6 @@
57
  overflow: visible;
58
  position: relative;
59
  }
60
-
61
  .omgf-optimize-fonts-container .option-title {
62
  position: absolute;
63
  left: -220px;
@@ -66,27 +60,22 @@
66
  font-size: 14px;
67
  color: #1d2327;
68
  }
69
-
70
  .omgf-optimize-fonts-container h3 {
71
  font-size: 1.3em;
72
  margin-top: 0;
73
  }
74
-
75
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage {
76
  text-align: left;
77
  }
78
-
79
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table {
80
  width: 100%;
81
  border-collapse: collapse;
82
  }
83
-
84
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table .tooltip {
85
  position: relative;
86
  font-size: 16px;
87
  line-height: 25px;
88
  }
89
-
90
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table .tooltip .tooltip-text {
91
  visibility: hidden;
92
  position: absolute;
@@ -103,50 +92,39 @@
103
  margin-left: -125px;
104
  border-radius: 3px;
105
  }
106
-
107
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table .tooltip .tooltip-text .illustration {
108
  margin-top: 10px;
109
  }
110
-
111
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table .tooltip:hover .tooltip-text {
112
  visibility: visible;
113
  }
114
-
115
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table thead th {
116
  width: 13%;
117
  }
118
-
119
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody {
120
  border: 1px solid #ccd0d4;
121
  }
122
-
123
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody th {
124
  padding: 5px 0 0 10px;
125
  width: 40%;
126
  }
127
-
128
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody td {
129
  padding-bottom: 5px;
130
  width: 13%;
131
  }
132
-
133
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody td .unload-mass-action {
134
  font-size: 0.9em;
135
  }
136
-
137
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody td .family {
138
  padding: 0 10px 0;
139
  font-weight: 600;
140
  }
141
-
142
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody tr:last-child td {
143
  padding-bottom: 10px;
144
  }
145
-
146
  .omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-pros {
147
  margin-right: 10px;
148
  }
149
-
150
  .omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-pros,
151
  .omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-cons {
152
  text-align: left;
@@ -154,44 +132,67 @@
154
  display: inline-block;
155
  vertical-align: top;
156
  }
157
-
158
  .omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-pros span:before,
159
  .omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-cons span:before {
160
  vertical-align: -4px;
161
  }
162
-
163
  .omgf-optimize-fonts-container .omgf-optimize-fonts-description label {
164
  font-size: 18px;
165
  font-weight: bold;
166
  }
167
-
168
  .omgf-optimize-fonts-container .omgf-optimize-fonts-description #omgf_manual_optimize_url {
169
  font-size: 18px;
170
  padding: 0 15px;
171
  margin-left: 10px;
172
  }
173
-
174
  .omgf-optimize-fonts-container .omgf-optimize-fonts-tooltip {
175
  padding: 0 15px 5px;
176
  }
177
-
178
  .omgf-optimize-fonts-container p,
179
  .omgf-optimize-fonts-container ul {
180
  text-align: justify;
181
  }
182
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  @media only screen and (max-width: 782px) {
184
  .omgf-optimize-fonts-container {
185
  margin: 20px 0;
186
  }
187
-
188
  .omgf-optimize-fonts-container .option-title {
189
  position: relative;
190
  left: initial;
191
  top: initial;
192
  }
193
  }
194
-
195
  /**
196
  * Loader
197
  */
@@ -203,7 +204,6 @@
203
  top: 0;
204
  text-align: center;
205
  }
206
-
207
  .omgf-loading .spinner {
208
  top: 50%;
209
  left: 50%;
@@ -211,24 +211,19 @@
211
  -ms-transform: translate(0, -70%);
212
  transform: translate(0, -70%);
213
  }
214
-
215
  /**
216
  * Welcome Block
217
  */
218
  #footer-thankyou a {
219
  vertical-align: -0.65em;
220
  }
221
-
222
  #footer-thankyou .dashicons.ffwp-heart {
223
  vertical-align: middle;
224
  }
225
-
226
  #footer-thankyou .dashicons.ffwp-heart:before {
227
  color: #FF4136;
228
  }
229
-
230
  #footer-thankyou .signature-image {
231
  width: 96px;
232
  }
233
-
234
- /*# sourceMappingURL=/wp-content/plugins/host-webfonts-local/assets/css/omgf-admin.css.map */
25
  white-space: nowrap;
26
  padding: 1px 10px !important;
27
  }
 
28
  .omgf .button-cancel:hover {
29
  cursor: pointer;
30
  background: #d54e21;
31
  color: #fff;
32
  border-color: #d54e21;
33
  }
 
34
  /**
35
  * Navigation
36
  */
37
  .omgf-nav {
38
  padding: 1em 0 1.5em;
39
  }
 
40
  .omgf-nav a {
41
  cursor: pointer;
42
  }
 
43
  .omgf-nav .dashicons-before:before {
44
  margin-right: 0.25em;
45
  line-height: 1.15em;
46
  }
 
47
  .omgf-optimize-fonts-container {
48
  text-align: center;
49
  padding: 25px 50px;
52
  overflow: visible;
53
  position: relative;
54
  }
 
55
  .omgf-optimize-fonts-container .option-title {
56
  position: absolute;
57
  left: -220px;
60
  font-size: 14px;
61
  color: #1d2327;
62
  }
 
63
  .omgf-optimize-fonts-container h3 {
64
  font-size: 1.3em;
65
  margin-top: 0;
66
  }
 
67
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage {
68
  text-align: left;
69
  }
 
70
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table {
71
  width: 100%;
72
  border-collapse: collapse;
73
  }
 
74
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table .tooltip {
75
  position: relative;
76
  font-size: 16px;
77
  line-height: 25px;
78
  }
 
79
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table .tooltip .tooltip-text {
80
  visibility: hidden;
81
  position: absolute;
92
  margin-left: -125px;
93
  border-radius: 3px;
94
  }
 
95
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table .tooltip .tooltip-text .illustration {
96
  margin-top: 10px;
97
  }
 
98
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table .tooltip:hover .tooltip-text {
99
  visibility: visible;
100
  }
 
101
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table thead th {
102
  width: 13%;
103
  }
 
104
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody {
105
  border: 1px solid #ccd0d4;
106
  }
 
107
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody th {
108
  padding: 5px 0 0 10px;
109
  width: 40%;
110
  }
 
111
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody td {
112
  padding-bottom: 5px;
113
  width: 13%;
114
  }
 
115
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody td .unload-mass-action {
116
  font-size: 0.9em;
117
  }
 
118
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody td .family {
119
  padding: 0 10px 0;
120
  font-weight: 600;
121
  }
 
122
  .omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody tr:last-child td {
123
  padding-bottom: 10px;
124
  }
 
125
  .omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-pros {
126
  margin-right: 10px;
127
  }
 
128
  .omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-pros,
129
  .omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-cons {
130
  text-align: left;
132
  display: inline-block;
133
  vertical-align: top;
134
  }
 
135
  .omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-pros span:before,
136
  .omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-cons span:before {
137
  vertical-align: -4px;
138
  }
 
139
  .omgf-optimize-fonts-container .omgf-optimize-fonts-description label {
140
  font-size: 18px;
141
  font-weight: bold;
142
  }
 
143
  .omgf-optimize-fonts-container .omgf-optimize-fonts-description #omgf_manual_optimize_url {
144
  font-size: 18px;
145
  padding: 0 15px;
146
  margin-left: 10px;
147
  }
 
148
  .omgf-optimize-fonts-container .omgf-optimize-fonts-tooltip {
149
  padding: 0 15px 5px;
150
  }
 
151
  .omgf-optimize-fonts-container p,
152
  .omgf-optimize-fonts-container ul {
153
  text-align: justify;
154
  }
155
+ #omgf-help-form .postbox {
156
+ padding: 0 15px 5px;
157
+ }
158
+ #omgf-help-form .postbox .column-container {
159
+ display: flex;
160
+ flex-flow: row wrap;
161
+ justify-content: space-between;
162
+ }
163
+ #omgf-help-form .postbox .column-container .column ul li {
164
+ margin-bottom: 10px;
165
+ }
166
+ #omgf-help-form .postbox .column-container .column ul li:last-child {
167
+ margin-bottom: none;
168
+ }
169
+ #omgf-help-form .postbox .column-container .column ul li a {
170
+ text-decoration: none;
171
+ line-height: 1.45;
172
+ }
173
+ #omgf-help-form .postbox .column-container .column ul li a i.dashicons {
174
+ margin-right: 5px;
175
+ color: #646970;
176
+ }
177
+ #omgf-help-form .postbox .column-container .column.last {
178
+ margin-right: 45px;
179
+ }
180
+ #omgf-help-form .postbox .column-container .column.last .signature {
181
+ text-align: center;
182
+ }
183
+ #omgf-help-form .postbox .column-container .column.last .signature .dashicons-heart {
184
+ color: #FF4136;
185
+ }
186
  @media only screen and (max-width: 782px) {
187
  .omgf-optimize-fonts-container {
188
  margin: 20px 0;
189
  }
 
190
  .omgf-optimize-fonts-container .option-title {
191
  position: relative;
192
  left: initial;
193
  top: initial;
194
  }
195
  }
 
196
  /**
197
  * Loader
198
  */
204
  top: 0;
205
  text-align: center;
206
  }
 
207
  .omgf-loading .spinner {
208
  top: 50%;
209
  left: 50%;
211
  -ms-transform: translate(0, -70%);
212
  transform: translate(0, -70%);
213
  }
 
214
  /**
215
  * Welcome Block
216
  */
217
  #footer-thankyou a {
218
  vertical-align: -0.65em;
219
  }
 
220
  #footer-thankyou .dashicons.ffwp-heart {
221
  vertical-align: middle;
222
  }
 
223
  #footer-thankyou .dashicons.ffwp-heart:before {
224
  color: #FF4136;
225
  }
 
226
  #footer-thankyou .signature-image {
227
  width: 96px;
228
  }
229
+ /*# sourceMappingURL=./omgf-admin.css.map */
 
assets/css/omgf-admin.css.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["omgf-admin.less"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAkBA,KACE;EACE,WAAA;EACA,qBAAA;EACA,yBAAA;EACA,gBAAA;EACA,eAAA;EACA,kBAAA;EACA,mBAAA;EACA,4BAAA;;AAEA,KAVF,eAUG;EACC,eAAA;EACA,mBAAA;EACA,WAAA;EACA,qBAAA;;;;;AAQN;EACE,oBAAA;;AADF,SAGE;EACE,eAAA;;AAJJ,SAOE,kBAAiB;EACf,oBAAA;EACA,mBAAA;;AAIJ;EACE,kBAAA;EACA,kBAAA;EACA,iBAAA;EACA,yBAAA;EACA,iBAAA;EACA,kBAAA;;AANF,8BAQE;EACE,kBAAA;EACA,YAAA;EACA,MAAA;EACA,gBAAA;EACA,eAAA;EACA,cAAA;;AAdJ,8BAiBE;EACE,gBAAA;EACA,aAAA;;AAnBJ,8BAsBE;EACE,gBAAA;;AAvBJ,8BAsBE,4BAGE;EACE,WAAA;EACA,yBAAA;;AA3BN,8BAsBE,4BAGE,MAIE;EACE,kBAAA;EACA,eAAA;EACA,iBAAA;;AAhCR,8BAsBE,4BAGE,MAIE,SAKE;EACE,kBAAA;EACA,kBAAA;EACA,SAAA;EACA,UAAA;EACA,cAAA;EACA,qCAAA;EACA,gDAA8C,oDAA+C,4BAA7F;EACA,gBAAA;EACA,WAAA;EACA,gBAAA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;EACA,kBAAA;;AAhDV,8BAsBE,4BAGE,MAIE,SAKE,cAgBE;EACE,gBAAA;;AAIJ,8BAjCN,4BAGE,MAIE,SA0BG,MAAO;EACN,mBAAA;;AAxDV,8BAsBE,4BAGE,MAmCE,MACE;EACE,UAAA;;AA9DV,8BAsBE,4BAGE,MAyCE;EACE,yBAAA;;AAnER,8BAsBE,4BAGE,MAyCE,MAGE;EACE,qBAAA;EACA,UAAA;;AAvEV,8BAsBE,4BAGE,MAyCE,MAQE;EACE,mBAAA;EACA,UAAA;;AA5EV,8BAsBE,4BAGE,MAyCE,MAQE,GAIE;EACE,gBAAA;;AA/EZ,8BAsBE,4BAGE,MAyCE,MAQE,GAQE;EACE,iBAAA;EACA,gBAAA;;AAKF,8BAnER,4BAGE,MAyCE,MAsBE,GACG,WACC;EACE,oBAAA;;AA3Fd,8BAmGE,iCACE;EACE,kBAAA;;AArGN,8BAmGE,iCAKE;AAxGJ,8BAmGE,iCAME;EACE,gBAAA;EACA,UAAA;EACA,qBAAA;EACA,mBAAA;;AA7GN,8BAmGE,iCAKE,0BAOE,KAAI;AA/GV,8BAmGE,iCAME,0BAME,KAAI;EACF,oBAAA;;AAhHR,8BAmGE,iCAiBE;EACE,eAAA;EACA,iBAAA;;AAtHN,8BAmGE,iCAsBE;EACE,eAAA;EACA,eAAA;EACA,iBAAA;;AA5HN,8BAgIE;EACE,mBAAA;;AAjIJ,8BAoIE;AApIF,8BAqIE;EACE,mBAAA;;AAIJ,wBAA0C;EACxC;IACE,cAAA;;EADF,8BAGE;IACE,kBAAA;IACA,aAAA;IACA,YAAA;;;;;;AAQN;EACE,eAAA;EACA,0CAAA;EACA,WAAA;EACA,YAAA;EACA,MAAA;EACA,kBAAA;;AANF,aAQE;EACE,QAAA;EACA,SAAA;EACA,kBAAA;EACA,eAAe,kBAAf;EACA,WAAW,kBAAX;;;;;AAOH,gBACC;EACE,uBAAA;;AAIA,gBADF,WACG;EACC,sBAAA;;AAGF,gBALF,WAKG,WAAW;EACV,cAAA;;AAXL,gBAeC;EACE,WAAA"}
1
+ {"version":3,"sources":["omgf-admin.less"],"names":[],"mappings":"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"}
assets/css/omgf-admin.less CHANGED
@@ -190,6 +190,54 @@
190
  }
191
  }
192
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  @media only screen and (max-width: 782px) {
194
  .omgf-optimize-fonts-container {
195
  margin: 20px 0;
190
  }
191
  }
192
 
193
+ #omgf-help-form {
194
+ .postbox {
195
+ padding: 0 15px 5px;
196
+
197
+ .column-container {
198
+ display: flex;
199
+ flex-flow: row wrap;
200
+ justify-content: space-between;
201
+
202
+ .column {
203
+ ul {
204
+ li {
205
+ margin-bottom: 10px;
206
+
207
+ &:last-child {
208
+ margin-bottom: none;
209
+ }
210
+
211
+ a {
212
+ text-decoration: none;
213
+ line-height: 1.45;
214
+
215
+ i {
216
+ &.dashicons {
217
+ margin-right: 5px;
218
+ color: #646970;
219
+ }
220
+ }
221
+ }
222
+ }
223
+ }
224
+
225
+ &.last {
226
+ margin-right: 45px;
227
+
228
+ .signature {
229
+ text-align: center;
230
+
231
+ .dashicons-heart {
232
+ color: #FF4136;
233
+ }
234
+ }
235
+ }
236
+ }
237
+ }
238
+ }
239
+ }
240
+
241
  @media only screen and (max-width: 782px) {
242
  .omgf-optimize-fonts-container {
243
  margin: 20px 0;
assets/css/omgf-admin.min.css CHANGED
@@ -1 +1 @@
1
- .omgf .button-cancel{color:#a00;text-decoration:none;border-color:transparent;box-shadow:none;background:0 0;border-radius:3px;white-space:nowrap;padding:1px 10px!important}.omgf .button-cancel:hover{cursor:pointer;background:#d54e21;color:#fff;border-color:#d54e21}.omgf-nav{padding:1em 0 1.5em}.omgf-nav a{cursor:pointer}.omgf-nav .dashicons-before:before{margin-right:.25em;line-height:1.15em}.omgf-optimize-fonts-container{text-align:center;padding:25px 50px;max-width:1024px;margin:20px auto 0 220px;overflow:visible;position:relative}.omgf-optimize-fonts-container .option-title{position:absolute;left:-220px;top:0;font-weight:600;font-size:14px;color:#1d2327}.omgf-optimize-fonts-container h3{font-size:1.3em;margin-top:0}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage{text-align:left}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table{width:100%;border-collapse:collapse}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table .tooltip{position:relative;font-size:16px;line-height:25px}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table .tooltip .tooltip-text{visibility:hidden;position:absolute;top:100%;left:100%;z-index:10000;background-color:rgba(0,0,0,.75);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:.8em;color:#fff;line-height:1.5;width:250px;padding:10px;margin-left:-125px;border-radius:3px}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table .tooltip .tooltip-text .illustration{margin-top:10px}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table .tooltip:hover .tooltip-text{visibility:visible}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table thead th{width:13%}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody{border:1px solid #ccd0d4}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody th{padding:5px 0 0 10px;width:40%}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody td{padding-bottom:5px;width:13%}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody td .unload-mass-action{font-size:.9em}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody td .family{padding:0 10px 0;font-weight:600}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody tr:last-child td{padding-bottom:10px}.omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-pros{margin-right:10px}.omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-cons,.omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-pros{text-align:left;width:48%;display:inline-block;vertical-align:top}.omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-cons span:before,.omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-pros span:before{vertical-align:-4px}.omgf-optimize-fonts-container .omgf-optimize-fonts-description label{font-size:18px;font-weight:700}.omgf-optimize-fonts-container .omgf-optimize-fonts-description #omgf_manual_optimize_url{font-size:18px;padding:0 15px;margin-left:10px}.omgf-optimize-fonts-container .omgf-optimize-fonts-tooltip{padding:0 15px 5px}.omgf-optimize-fonts-container p,.omgf-optimize-fonts-container ul{text-align:justify}@media only screen and (max-width:782px){.omgf-optimize-fonts-container{margin:20px 0}.omgf-optimize-fonts-container .option-title{position:relative;left:initial;top:initial}}.omgf-loading{position:fixed;background-color:rgba(255,255,255,.6);width:100%;height:100%;top:0;text-align:center}.omgf-loading .spinner{top:50%;left:50%;position:absolute;-ms-transform:translate(0,-70%);transform:translate(0,-70%)}#footer-thankyou a{vertical-align:-.65em}#footer-thankyou .dashicons.ffwp-heart{vertical-align:middle}#footer-thankyou .dashicons.ffwp-heart:before{color:#ff4136}#footer-thankyou .signature-image{width:96px}
1
+ .omgf .button-cancel{color:#a00;text-decoration:none;border-color:transparent;box-shadow:none;background:0 0;border-radius:3px;white-space:nowrap;padding:1px 10px!important}.omgf .button-cancel:hover{cursor:pointer;background:#d54e21;color:#fff;border-color:#d54e21}.omgf-nav{padding:1em 0 1.5em}.omgf-nav a{cursor:pointer}.omgf-nav .dashicons-before:before{margin-right:.25em;line-height:1.15em}.omgf-optimize-fonts-container{text-align:center;padding:25px 50px;max-width:1024px;margin:20px auto 0 220px;overflow:visible;position:relative}.omgf-optimize-fonts-container .option-title{position:absolute;left:-220px;top:0;font-weight:600;font-size:14px;color:#1d2327}.omgf-optimize-fonts-container h3{font-size:1.3em;margin-top:0}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage{text-align:left}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table{width:100%;border-collapse:collapse}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table .tooltip{position:relative;font-size:16px;line-height:25px}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table .tooltip .tooltip-text{visibility:hidden;position:absolute;top:100%;left:100%;z-index:10000;background-color:rgba(0,0,0,.75);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:.8em;color:#fff;line-height:1.5;width:250px;padding:10px;margin-left:-125px;border-radius:3px}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table .tooltip .tooltip-text .illustration{margin-top:10px}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table .tooltip:hover .tooltip-text{visibility:visible}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table thead th{width:13%}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody{border:1px solid #ccd0d4}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody th{padding:5px 0 0 10px;width:40%}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody td{padding-bottom:5px;width:13%}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody td .unload-mass-action{font-size:.9em}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody td .family{padding:0 10px 0;font-weight:600}.omgf-optimize-fonts-container .omgf-optimize-fonts-manage table tbody tr:last-child td{padding-bottom:10px}.omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-pros{margin-right:10px}.omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-cons,.omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-pros{text-align:left;width:48%;display:inline-block;vertical-align:top}.omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-cons span:before,.omgf-optimize-fonts-container .omgf-optimize-fonts-description .omgf-optimize-fonts-pros span:before{vertical-align:-4px}.omgf-optimize-fonts-container .omgf-optimize-fonts-description label{font-size:18px;font-weight:700}.omgf-optimize-fonts-container .omgf-optimize-fonts-description #omgf_manual_optimize_url{font-size:18px;padding:0 15px;margin-left:10px}.omgf-optimize-fonts-container .omgf-optimize-fonts-tooltip{padding:0 15px 5px}.omgf-optimize-fonts-container p,.omgf-optimize-fonts-container ul{text-align:justify}#omgf-help-form .postbox{padding:0 15px 5px}#omgf-help-form .postbox .column-container{display:flex;flex-flow:row wrap;justify-content:space-between}#omgf-help-form .postbox .column-container .column ul li{margin-bottom:10px}#omgf-help-form .postbox .column-container .column ul li:last-child{margin-bottom:none}#omgf-help-form .postbox .column-container .column ul li a{text-decoration:none;line-height:1.45}#omgf-help-form .postbox .column-container .column ul li a i.dashicons{margin-right:5px;color:#646970}#omgf-help-form .postbox .column-container .column.last{margin-right:45px}#omgf-help-form .postbox .column-container .column.last .signature{text-align:center}#omgf-help-form .postbox .column-container .column.last .signature .dashicons-heart{color:#ff4136}@media only screen and (max-width:782px){.omgf-optimize-fonts-container{margin:20px 0}.omgf-optimize-fonts-container .option-title{position:relative;left:initial;top:initial}}.omgf-loading{position:fixed;background-color:rgba(255,255,255,.6);width:100%;height:100%;top:0;text-align:center}.omgf-loading .spinner{top:50%;left:50%;position:absolute;-ms-transform:translate(0,-70%);transform:translate(0,-70%)}#footer-thankyou a{vertical-align:-.65em}#footer-thankyou .dashicons.ffwp-heart{vertical-align:middle}#footer-thankyou .dashicons.ffwp-heart:before{color:#ff4136}#footer-thankyou .signature-image{width:96px}
assets/images/logo-color.png ADDED
Binary file
assets/js/omgf-admin.js CHANGED
@@ -283,6 +283,7 @@ jQuery(document).ready(function ($) {
283
  };
284
 
285
  omgf_show_loader = omgf_admin.show_loader;
 
286
 
287
  omgf_admin.init();
288
  });
283
  };
284
 
285
  omgf_show_loader = omgf_admin.show_loader;
286
+ omgf_unload_all = omgf_admin.unload_all;
287
 
288
  omgf_admin.init();
289
  });
host-webfonts-local.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: OMGF
5
  * Plugin URI: https://daan.dev/wordpress-plugins/host-google-fonts-locally
6
  * Description: Minimize DNS requests, leverage browser cache and speed up WordPress by saving Google Fonts to your server and removing external Google Fonts requests.
7
- * Version: 4.5.15
8
  * Author: Daan from FFW.Press
9
  * Author URI: https://ffw.press
10
  * License: GPL2v2 or later
@@ -21,6 +21,7 @@ define('OMGF_PLUGIN_FILE', __FILE__);
21
  define('OMGF_PLUGIN_BASENAME', plugin_basename(OMGF_PLUGIN_FILE));
22
  define('OMGF_STATIC_VERSION', '4.5.11');
23
  define('OMGF_DB_VERSION', '4.5.1');
 
24
 
25
  /**
26
  * Takes care of loading classes on demand.
4
  * Plugin Name: OMGF
5
  * Plugin URI: https://daan.dev/wordpress-plugins/host-google-fonts-locally
6
  * Description: Minimize DNS requests, leverage browser cache and speed up WordPress by saving Google Fonts to your server and removing external Google Fonts requests.
7
+ * Version: 4.5.16
8
  * Author: Daan from FFW.Press
9
  * Author URI: https://ffw.press
10
  * License: GPL2v2 or later
21
  define('OMGF_PLUGIN_BASENAME', plugin_basename(OMGF_PLUGIN_FILE));
22
  define('OMGF_STATIC_VERSION', '4.5.11');
23
  define('OMGF_DB_VERSION', '4.5.1');
24
+ define('OMGF_DEBUG_MODE', false); // Do NOT leave this enabled. For debugging purposes only.
25
 
26
  /**
27
  * Takes care of loading classes on demand.
includes/admin/settings/class-help.php CHANGED
@@ -38,36 +38,36 @@ class OMGF_Admin_Settings_Help extends OMGF_Admin_Settings_Builder
38
  $utmTags = '?utm_source=omgf&utm_medium=plugin&utm_campaign=support_tab';
39
  $tweetUrl = sprintf("https://twitter.com/intent/tweet?text=I+am+using+%s+to+speed+up+Google+Fonts+for+@WordPress!+Try+it+for+yourself:&via=Dan0sz&hashtags=GoogleFonts,WordPress,Pagespeed,Insights&url=%s", str_replace(' ', '+', apply_filters('omgf_settings_page_title', 'OMGF')), apply_filters('omgf_help_tab_plugin_url', 'https://wordpress.org/plugins/host-webfonts-local/'));
40
  ?>
41
- <div class="welcome-panel">
42
- <div class="welcome-panel-content">
43
  <h2><?= sprintf(__('Thank you for using %s!', $this->plugin_text_domain), apply_filters('omgf_settings_page_title', 'OMGF')); ?></h2>
44
- <p class="about-description">
45
  <?= sprintf(__('Need help configuring %s? Please refer to the links below to get you started.', $this->plugin_text_domain), apply_filters('omgf_settings_page_title', 'OMGF')); ?>
46
  </p>
47
- <div class="welcome-panel-column-container">
48
- <div class="welcome-panel-column">
49
  <h3>
50
  <?php _e('Need Help?', $this->plugin_text_domain); ?>
51
  </h3>
52
  <ul>
53
- <li><a class="welcome-icon dashicons-controls-forward" target="_blank" href="<?= apply_filters('omgf_settings_help_quick_start', 'https://docs.ffw.press/article/7-quick-start'); ?>"><?= __('Quick Start Guide', $this->plugin_text_domain); ?></a></li>
54
- <li><a class="welcome-icon dashicons-text-page" target="_blank" href="<?= apply_filters('omgf_settings_help_user_manual', 'https://docs.ffw.press/category/4-omgf-pro'); ?>"><?= __('User Manual', $this->plugin_text_domain); ?></a></li>
55
- <li><a class="welcome-icon dashicons-editor-help" target="_blank" href="<?= apply_filters('omgf_settings_help_faq_link', 'https://docs.ffw.press/article/9-frequently-asked-question-faq'); ?>"><?= __('FAQ', $this->plugin_text_domain); ?></a></li>
56
- <li><a class="welcome-icon dashicons-sos" target="_blank" href="<?= apply_filters('omgf_settings_help_troubleshooting_link', 'https://docs.ffw.press/category/37-omgf-pro---troubleshooting'); ?>"><?= __('Troubleshooting Guide', $this->plugin_text_domain); ?></a></li>
57
- <li><a class="welcome-icon dashicons-email" target="_blank" href="<?= apply_filters('omgf_settings_help_support_link', 'https://docs.ffw.press/contact'); ?>"><?= __('Get Support', $this->plugin_text_domain); ?></a></li>
58
  </ul>
59
  </div>
60
- <div class="welcome-panel-column">
61
  <h3><?= sprintf(__('Support %s & Spread the Word!', $this->plugin_text_domain), apply_filters('omgf_settings_page_title', 'OMGF')); ?></h3>
62
  <ul>
63
- <li><a class="welcome-icon dashicons-star-filled" target="_blank" href="<?= apply_filters('omgf_help_tab_review_link', 'https://wordpress.org/support/plugin/host-webfonts-local/reviews/?rate=5#new-post'); ?>"><?= __('Write a 5-star Review or,', $this->plugin_text_domain); ?></a></li>
64
- <li><a class="welcome-icon dashicons-twitter" target="_blank" href="<?= $tweetUrl; ?>"><?= __('Tweet about it!', $this->plugin_text_domain); ?></a></li>
65
  </ul>
66
  </div>
67
- <div class="welcome-panel-column welcome-panel-last">
68
- <h3 class="signature"><?= __('Check out my other plugins', $this->plugin_text_domain); ?> @</h3>
69
  <p class="signature">
70
- <a target="_blank" title="<?= __('Visit FFW Press', $this->plugin_text_domain); ?>" href="https://ffw.press/wordpress-plugins/"><img class="signature-image" alt="<?= __('Visit FFW Press', $this->plugin_text_domain); ?>" src="https://ffw.press/wp-content/uploads/2021/01/logo-color-full@05x.png" /></a>
71
  </p>
72
  </div>
73
  </div>
38
  $utmTags = '?utm_source=omgf&utm_medium=plugin&utm_campaign=support_tab';
39
  $tweetUrl = sprintf("https://twitter.com/intent/tweet?text=I+am+using+%s+to+speed+up+Google+Fonts+for+@WordPress!+Try+it+for+yourself:&via=Dan0sz&hashtags=GoogleFonts,WordPress,Pagespeed,Insights&url=%s", str_replace(' ', '+', apply_filters('omgf_settings_page_title', 'OMGF')), apply_filters('omgf_help_tab_plugin_url', 'https://wordpress.org/plugins/host-webfonts-local/'));
40
  ?>
41
+ <div class="postbox">
42
+ <div class="content">
43
  <h2><?= sprintf(__('Thank you for using %s!', $this->plugin_text_domain), apply_filters('omgf_settings_page_title', 'OMGF')); ?></h2>
44
+ <p class="about">
45
  <?= sprintf(__('Need help configuring %s? Please refer to the links below to get you started.', $this->plugin_text_domain), apply_filters('omgf_settings_page_title', 'OMGF')); ?>
46
  </p>
47
+ <div class="column-container">
48
+ <div class="column">
49
  <h3>
50
  <?php _e('Need Help?', $this->plugin_text_domain); ?>
51
  </h3>
52
  <ul>
53
+ <li><a target="_blank" href="<?= apply_filters('omgf_settings_help_quick_start', 'https://docs.ffw.press/article/7-quick-start'); ?>"><i class="dashicons dashicons-controls-forward"></i><?= __('Quick Start Guide', $this->plugin_text_domain); ?></a></li>
54
+ <li><a target="_blank" href="<?= apply_filters('omgf_settings_help_user_manual', 'https://docs.ffw.press/category/4-omgf-pro'); ?>"><i class="dashicons dashicons-text-page"></i><?= __('User Manual', $this->plugin_text_domain); ?></a></li>
55
+ <li><a target="_blank" href="<?= apply_filters('omgf_settings_help_faq_link', 'https://docs.ffw.press/article/9-frequently-asked-question-faq'); ?>"><i class="dashicons dashicons-editor-help"></i><?= __('FAQ', $this->plugin_text_domain); ?></a></li>
56
+ <li><a target="_blank" href="<?= apply_filters('omgf_settings_help_troubleshooting_link', 'https://docs.ffw.press/category/37-omgf-pro---troubleshooting'); ?>"><i class="dashicons dashicons-sos"></i><?= __('Troubleshooting Guide', $this->plugin_text_domain); ?></a></li>
57
+ <li><a target="_blank" href="<?= apply_filters('omgf_settings_help_support_link', 'https://docs.ffw.press/contact'); ?>"><i class="dashicons dashicons-email"></i><?= __('Get Support', $this->plugin_text_domain); ?></a></li>
58
  </ul>
59
  </div>
60
+ <div class="column">
61
  <h3><?= sprintf(__('Support %s & Spread the Word!', $this->plugin_text_domain), apply_filters('omgf_settings_page_title', 'OMGF')); ?></h3>
62
  <ul>
63
+ <li><a target="_blank" href="<?= apply_filters('omgf_help_tab_review_link', 'https://wordpress.org/support/plugin/host-webfonts-local/reviews/?rate=5#new-post'); ?>"><i class="dashicons dashicons-star-filled"></i><?= __('Write a 5-star Review or,', $this->plugin_text_domain); ?></a></li>
64
+ <li><a target="_blank" href="<?= $tweetUrl; ?>"><i class="dashicons dashicons-twitter"></i><?= __('Tweet about it!', $this->plugin_text_domain); ?></a></li>
65
  </ul>
66
  </div>
67
+ <div class="column last">
68
+ <h3 class="signature"><?= sprintf(__('Coded with %s by', $this->plugin_text_domain), '<i class="dashicons dashicons-heart"></i>'); ?> </h3>
69
  <p class="signature">
70
+ <a target="_blank" title="<?= __('Visit FFW Press', $this->plugin_text_domain); ?>" href="https://ffw.press/wordpress-plugins/"><img class="signature-image" alt="<?= __('Visit FFW Press', $this->plugin_text_domain); ?>" src="<?= plugin_dir_url(CAOS_PLUGIN_FILE) . 'assets/images/logo-color.png'; ?>" /></a>
71
  </p>
72
  </div>
73
  </div>
includes/admin/settings/class-optimize.php CHANGED
@@ -211,6 +211,7 @@ class OMGF_Admin_Settings_Optimize extends OMGF_Admin_Settings_Builder
211
  <th><?= __('Preload', $this->plugin_text_domain); ?><span class="dashicons dashicons-info tooltip"><span class="tooltip-text"><span class="inline-text"><?= __('Preload font files (before everything else) so they will be available as soon as they are required for the rendering of the page. Only use preload for font files that are used above the fold.', $this->plugin_text_domain); ?></span><img width="230" class="illustration" src="<?= plugin_dir_url(OMGF_PLUGIN_FILE) . 'assets/images/above-the-fold.png'; ?>" /></span></span></th>
212
  <th><?= __('Do not load', $this->plugin_text_domain); ?></th>
213
  <th><?= __('Fallback Font Stack (Pro)', $this->plugin_text_domain); ?></th>
 
214
  </tr>
215
  </thead>
216
  <?php
@@ -243,6 +244,13 @@ class OMGF_Admin_Settings_Optimize extends OMGF_Admin_Settings_Builder
243
  <?php endforeach; ?>
244
  </select>
245
  </td>
 
 
 
 
 
 
 
246
  </tr>
247
  <?php foreach ($font->variants as $variant) : ?>
248
  <tr>
211
  <th><?= __('Preload', $this->plugin_text_domain); ?><span class="dashicons dashicons-info tooltip"><span class="tooltip-text"><span class="inline-text"><?= __('Preload font files (before everything else) so they will be available as soon as they are required for the rendering of the page. Only use preload for font files that are used above the fold.', $this->plugin_text_domain); ?></span><img width="230" class="illustration" src="<?= plugin_dir_url(OMGF_PLUGIN_FILE) . 'assets/images/above-the-fold.png'; ?>" /></span></span></th>
212
  <th><?= __('Do not load', $this->plugin_text_domain); ?></th>
213
  <th><?= __('Fallback Font Stack (Pro)', $this->plugin_text_domain); ?></th>
214
+ <th><?= __('Replace (Pro)', $this->plugin_text_domain); ?><span class="dashicons dashicons-info tooltip"><span class="tooltip-text"><span class="inline-text"><?= __('When the Replace option is checked, the selected Fallback Font Stack will replace the corresponding Google Font family, instead of functioning as a fallback.', $this->plugin_text_domain); ?></span></span></span></th>
215
  </tr>
216
  </thead>
217
  <?php
244
  <?php endforeach; ?>
245
  </select>
246
  </td>
247
+ <td class="replace">
248
+ <?php
249
+ $replace = defined('OMGF_PRO_REPLACE_FONT') && isset(OMGF_PRO_REPLACE_FONT[$handle][$font->id]) && OMGF_PRO_REPLACE_FONT[$handle][$font->id] == 'on' ? 'checked' : '';
250
+ $fallback = defined('OMGF_PRO_FALLBACK_FONT_STACK') && isset(OMGF_PRO_FALLBACK_FONT_STACK[$handle][$font->id]) && OMGF_PRO_FALLBACK_FONT_STACK[$handle][$font->id] !== '';
251
+ ?>
252
+ <input autocomplete="off" type="checkbox" class="replace" <?= $replace; ?> <?= $fallback ? '' : 'disabled'; ?> <?= apply_filters('omgf_pro_replace_font_setting_disabled', true) ? 'disabled' : ''; ?> name="omgf_pro_replace_font[<?= $handle; ?>][<?= $font->id; ?>]" />
253
+ </td>
254
  </tr>
255
  <?php foreach ($font->variants as $variant) : ?>
256
  <tr>
includes/api/class-download.php CHANGED
@@ -101,7 +101,9 @@ class OMGF_API_Download extends WP_REST_Controller
101
  $original_handle = sanitize_title_with_dashes($request->get_param('original_handle'));
102
 
103
  if (!$this->handle || !$original_handle) {
104
- wp_die(__('Handle not provided.', $this->plugin_text_domain), 406);
 
 
105
  }
106
 
107
  $this->path = WP_CONTENT_DIR . OMGF_CACHE_PATH . '/' . $this->handle;
101
  $original_handle = sanitize_title_with_dashes($request->get_param('original_handle'));
102
 
103
  if (!$this->handle || !$original_handle) {
104
+ OMGF_Admin_Notice::set_notice(sprintf(__('OMGF couldn\'t find required stylesheet handle parameter while attempting to talk to API. Values sent were <code>%s</code> and <code>%s</code>.', $this->plugin_text_domain), $original_handle, $this->handle), 'omgf-api-handle-not-found', false, 'error', 406);
105
+
106
+ return;
107
  }
108
 
109
  $this->path = WP_CONTENT_DIR . OMGF_CACHE_PATH . '/' . $this->handle;
includes/class-omgf.php CHANGED
@@ -193,7 +193,10 @@ class OMGF
193
  $cache_keys = self::cache_keys();
194
 
195
  foreach ($cache_keys as $index => $key) {
196
- if (strpos($key, $handle) !== false) {
 
 
 
197
  return $key;
198
  }
199
  }
@@ -360,4 +363,19 @@ class OMGF
360
  unlink($entry);
361
  }
362
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
  }
193
  $cache_keys = self::cache_keys();
194
 
195
  foreach ($cache_keys as $index => $key) {
196
+ /**
197
+ * @since v4.5.16 Convert $handle to lowercase, because $key is saved lowercase, too.
198
+ */
199
+ if (strpos($key, strtolower($handle)) !== false) {
200
  return $key;
201
  }
202
  }
363
  unlink($entry);
364
  }
365
  }
366
+
367
+ /**
368
+ * Global debug logging function.
369
+ *
370
+ * @param mixed $message
371
+ * @return void
372
+ */
373
+ public static function debug($message)
374
+ {
375
+ if (!OMGF_DEBUG_MODE) {
376
+ return;
377
+ }
378
+
379
+ error_log(current_time('Y-m-d H:i:s') . ' ' . microtime() . ": $message\n", 3, trailingslashit(WP_CONTENT_DIR) . 'omgf-pro-debug.log');
380
+ }
381
  }
includes/frontend/class-functions.php CHANGED
@@ -1,4 +1,6 @@
1
  <?php
 
 
2
  /* * * * * * * * * * * * * * * * * * * * *
3
  *
4
  * ██████╗ ███╗ ███╗ ██████╗ ███████╗
@@ -13,9 +15,6 @@
13
  * @copyright: (c) 2021 Daan van den Bergh
14
  * @url : https://daan.dev
15
  * * * * * * * * * * * * * * * * * * * */
16
-
17
- defined('ABSPATH') || exit;
18
-
19
  class OMGF_Frontend_Functions
20
  {
21
  const OMGF_STYLE_HANDLE = 'omgf-fonts';
@@ -23,6 +22,9 @@ class OMGF_Frontend_Functions
23
  /** @var bool $do_optimize */
24
  private $do_optimize;
25
 
 
 
 
26
  /**
27
  * OMGF_Frontend_Functions constructor.
28
  */
@@ -170,8 +172,12 @@ class OMGF_Frontend_Functions
170
 
171
  $updated_handle = $handle;
172
 
173
- if ($unloaded_fonts) {
174
- $updated_handle = OMGF::get_cache_key($handle);
 
 
 
 
175
  }
176
 
177
  $cached_file = OMGF_CACHE_PATH . '/' . $updated_handle . "/$updated_handle.css";
@@ -206,9 +212,13 @@ class OMGF_Frontend_Functions
206
  array_merge(
207
  $query_array,
208
  [
209
- 'handle' => $updated_handle,
210
- 'original_handle' => $handle,
211
- '_wpnonce' => wp_create_nonce('wp_rest')
 
 
 
 
212
  ]
213
  )
214
  );
@@ -238,6 +248,9 @@ class OMGF_Frontend_Functions
238
  /**
239
  * @since v4.5.11 Added filter to allow adding additional stylesheets.
240
  */
 
 
 
241
  return apply_filters('omgf_detected_registered_stylesheets', $detected_stylesheets, $registered_styles);
242
  }
243
  }
1
  <?php
2
+ defined('ABSPATH') || exit;
3
+
4
  /* * * * * * * * * * * * * * * * * * * * *
5
  *
6
  * ██████╗ ███╗ ███╗ ██████╗ ███████╗
15
  * @copyright: (c) 2021 Daan van den Bergh
16
  * @url : https://daan.dev
17
  * * * * * * * * * * * * * * * * * * * */
 
 
 
18
  class OMGF_Frontend_Functions
19
  {
20
  const OMGF_STYLE_HANDLE = 'omgf-fonts';
22
  /** @var bool $do_optimize */
23
  private $do_optimize;
24
 
25
+ /** @var string $plugin_text_domain */
26
+ private $plugin_text_domain = 'host-webfonts-local';
27
+
28
  /**
29
  * OMGF_Frontend_Functions constructor.
30
  */
172
 
173
  $updated_handle = $handle;
174
 
175
+ if ($unloaded_fonts && $cache_key = OMGF::get_cache_key($handle)) {
176
+ /**
177
+ * @since v4.5.16 Since cache key returns an empty string if none is found, an extra
178
+ * check is required to not accidentally overwrite the $updated_handle.
179
+ */
180
+ $updated_handle = $cache_key;
181
  }
182
 
183
  $cached_file = OMGF_CACHE_PATH . '/' . $updated_handle . "/$updated_handle.css";
212
  array_merge(
213
  $query_array,
214
  [
215
+ /**
216
+ * @since v4.5.16 convert handle parameters to lowercase, to make sure the naming is
217
+ * consistent across the board.
218
+ */
219
+ 'handle' => strtolower($updated_handle),
220
+ 'original_handle' => strtolower($handle),
221
+ '_wpnonce' => wp_create_nonce('wp_rest')
222
  ]
223
  )
224
  );
248
  /**
249
  * @since v4.5.11 Added filter to allow adding additional stylesheets.
250
  */
251
+
252
+ OMGF::debug(sprintf(__('Found %s stylesheets containing Google Fonts: %s', $this->plugin_text_domain), $detected_stylesheets, print_r($detected_stylesheets, true)));
253
+
254
  return apply_filters('omgf_detected_registered_stylesheets', $detected_stylesheets, $registered_styles);
255
  }
256
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: DaanvandenBergh
3
  Tags: google, fonts, gdpr, cache, speed, preload, font-display, webfonts, subsets, remove, minimize, external, requests
4
  Requires at least: 4.6
5
  Tested up to: 5.9
6
- Stable tag: 4.5.15
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -83,81 +83,89 @@ For the FAQ, [click here](https://docs.ffw.press/category/76-omgf-pro---faq).
83
 
84
  == Changelog ==
85
 
 
 
 
 
 
 
 
 
86
  = 4.5.15 | January 26th, 2022 =
87
  * Tested with WP 5.9
88
- - Fix: WP 5.9 welcome banner displayed in Optimized Fonts Manager section.
89
 
90
  = 4.5.14 | January 18th, 2022 =
91
- * Fix: Pro options Google Fonts Source URL and AMP handling couldn't be saved.
92
 
93
  = 4.5.13 | January 4th, 2022 =
94
- * Sec: Properly check permissions when Download API is accessed.
95
 
96
  = 4.5.12 | November 27th, 2021 =
97
- * Sec: Prevent path traversal when cache directory setting is changed. (Thanks, @jsgm!)
98
 
99
  = 4.5.11 | November 17th, 2021 =
100
- * Doc: Updated links to fancy new documentation hub: docs.ffw.press
101
  * Dev: Added $font_family to omgf_alternate_api_url filter.
102
  * Dev: Added filter to detect_registered_stylesheets().
103
- * Fix: disable preload/unload when opposite checkbox is checked.
104
- * Fix: Updated RSS feed URL and properly encode retrieved XML to prevent parse error simplexml_load_string().
105
  * Promo: Added force font-display promo material.
106
 
107
  = 4.5.10 | October 18th, 2021 =
108
- * Enhancement: API now cleans up excessive spacing and + symbols in requests before fetching fonts. This comes in handy when e.g. @import statements in CSS stylesheets are auto-formatted by IDEs.
109
- * Fix: API would crash when Google Fonts request turned up empty.
110
- * Fix: Added proper error handling for when downloading fonts failed.
111
- * Doc: Added link to Troubleshooting Guide to Help tab.
112
 
113
  = 4.5.9 | October 5th, 2021 =
114
- * Fix: content_url() should always be encoded, also if file already exists.
115
- * Enhancement: If stylesheet is already generated, stop execution to decrease API request time.
116
 
117
  = 4.5.8 =
118
- * Fix: use array_merge() to prevent unsupported operand types error.
119
 
120
  = 4.5.7 | September 29th, 2021 =
121
- * Enhancement: significantly reduced code running frontend.
122
- * Fix: internal requests to OMGF's Download API are no longer treated as 'remote'.
123
- * Fix: stylesheets are no longer skipped in some situations by the temp storage layer, before writing them to the database.
124
- * Fix: using the mass actions (e.g. unload all, unload italics) no longer affect font families with the same name in a stylesheet with a different handle.
125
- * Fix: Italic fonts are now properly detected by the API when CSS2 (variable fonts) API is used by themes and/or plugins.
126
- * Fix: Added my own self-managed fallback API mirror to prevent more Google Fonts API downtime.
127
- * Enhancement: reduced code in Download API by ~20%.
128
  * Dev: add-ons for OMGF can now use the show_loader() method.
129
  * Several UX and performance tweaks.
130
 
131
  = 4.5.6 =
132
- * Fix: Added Fallback API URL for when Google Fonts Helper is down.
133
- * Enhancement: Added extra error handling in Manual Optimization Mode.
134
- * Fix: API requests made in Manual Optimization Mode are no longer forced to SSL. It now uses the protocol configured in Settings > General > WordPress URL.
135
- * Fix: Stylesheet handles containing spaces would prevent Optimize Google Fonts screen from rendering properly.
136
  * Several refactors and code optimizations.
137
 
138
  = 4.5.5 =
139
- * Fix: Prevent collision with other plugins when authenticating AJAX-calls.
140
 
141
  = 4.5.4 | August 18th, 2021 =
142
  * Security: Access to the Download API now requires a valid nonce to prevent CSRF.
143
  * Security: Added authentication to Empty Cache Directory AJAX-call.
144
 
145
  = 4.5.3 | August 17th, 2021 =
146
- * Fix: "Too few arguments to function OmgfPro_Frontend_AutoReplace::passthru_handle()" would occur if OMGF Pro was updated to v2.5.1 before OMGF was updated to v4.5.2.
147
  * Security: Added checks to prevent path traversal and CSRF in Empty Cache Directory AJAX call.
148
 
149
  = 4.5.2 | August 16th, 2021 =
150
  * Pro Feature: Added promo material for @font-face detection in local stylesheets.
151
- * Fix: Fixed several warnings and notices.
152
 
153
  = 4.5.1 | August 2nd, 2021 =
154
- * Enhancement: Added post update notice to inform user of the plugin's database changes. The current notice you were viewed was simply, because the current DB version wasn't logged yet on your system. So if you're reading this: Ha! Made you look! ;)
155
  * Pro Feature: Added promo material for Fallback Font Stack (Pro) feature.
156
- * Enhancement: moved Stylesheet Generator to its own backend API.
157
- * Enhancement: moved Font Downloader to its own backend API.
158
- * Enhancement: Updated description of Optimization Modes.
159
- * Fix: Fixed glitch in footer news ticker.
160
- * Enhancement: Added several filter and action hooks to allow a more seamless integration with OMGF Pro and OMGF Additional Fonts.
161
  * Several code and performance optimizations.
162
 
163
  = 4.5.0 | July 28th, 2021 =
3
  Tags: google, fonts, gdpr, cache, speed, preload, font-display, webfonts, subsets, remove, minimize, external, requests
4
  Requires at least: 4.6
5
  Tested up to: 5.9
6
+ Stable tag: 4.5.16
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
83
 
84
  == Changelog ==
85
 
86
+ = 4.5.16 | February 2nd, 2022 =
87
+ * Fixed: WP 5.9 welcome banner removed from Help section.
88
+ * Added: Basic debugging throughout the plugin (can be enable by setting the OMGF_DEBUG_MODE constant to true);
89
+ * Fixed: Updated handle was overwritten by empty value if cache key wasn't defined.
90
+ * Added: More user friendly error messages.
91
+ * Fixed: "Handle not provided" error should not kill the entire Download API process (post OMGF v4)
92
+ * Pro Feature: Fallback Font Stacks can now Replace an entire Google Fonts font-family.
93
+
94
  = 4.5.15 | January 26th, 2022 =
95
  * Tested with WP 5.9
96
+ - Fixed: WP 5.9 welcome banner displayed in Optimized Fonts Manager section.
97
 
98
  = 4.5.14 | January 18th, 2022 =
99
+ * Fixed: Pro options Google Fonts Source URL and AMP handling couldn't be saved.
100
 
101
  = 4.5.13 | January 4th, 2022 =
102
+ * Secured: Properly check permissions when Download API is accessed.
103
 
104
  = 4.5.12 | November 27th, 2021 =
105
+ * Secured: Prevent path traversal when cache directory setting is changed. (Thanks, @jsgm!)
106
 
107
  = 4.5.11 | November 17th, 2021 =
108
+ * Documented: Updated links to fancy new documentation hub: docs.ffw.press
109
  * Dev: Added $font_family to omgf_alternate_api_url filter.
110
  * Dev: Added filter to detect_registered_stylesheets().
111
+ * Fixed: disable preload/unload when opposite checkbox is checked.
112
+ * Fixed: Updated RSS feed URL and properly encode retrieved XML to prevent parse error simplexml_load_string().
113
  * Promo: Added force font-display promo material.
114
 
115
  = 4.5.10 | October 18th, 2021 =
116
+ * Enhanced: API now cleans up excessive spacing and + symbols in requests before fetching fonts. This comes in handy when e.g. @import statements in CSS stylesheets are auto-formatted by IDEs.
117
+ * Fixed: API would crash when Google Fonts request turned up empty.
118
+ * Fixed: Added proper error handling for when downloading fonts failed.
119
+ * Documented: Added link to Troubleshooting Guide to Help tab.
120
 
121
  = 4.5.9 | October 5th, 2021 =
122
+ * Fixed: content_url() should always be encoded, also if file already exists.
123
+ * Enhanced: If stylesheet is already generated, stop execution to decrease API request time.
124
 
125
  = 4.5.8 =
126
+ * Fixed: use array_merge() to prevent unsupported operand types error.
127
 
128
  = 4.5.7 | September 29th, 2021 =
129
+ * Enhanced: significantly reduced code running frontend.
130
+ * Fixed: internal requests to OMGF's Download API are no longer treated as 'remote'.
131
+ * Fixed: stylesheets are no longer skipped in some situations by the temp storage layer, before writing them to the database.
132
+ * Fixed: using the mass actions (e.g. unload all, unload italics) no longer affect font families with the same name in a stylesheet with a different handle.
133
+ * Fixed: Italic fonts are now properly detected by the API when CSS2 (variable fonts) API is used by themes and/or plugins.
134
+ * Fixed: Added my own self-managed fallback API mirror to prevent more Google Fonts API downtime.
135
+ * Enhanced: reduced code in Download API by ~20%.
136
  * Dev: add-ons for OMGF can now use the show_loader() method.
137
  * Several UX and performance tweaks.
138
 
139
  = 4.5.6 =
140
+ * Fixed: Added Fallback API URL for when Google Fonts Helper is down.
141
+ * Enhanced: Added extra error handling in Manual Optimization Mode.
142
+ * Fixed: API requests made in Manual Optimization Mode are no longer forced to SSL. It now uses the protocol configured in Settings > General > WordPress URL.
143
+ * Fixed: Stylesheet handles containing spaces would prevent Optimize Google Fonts screen from rendering properly.
144
  * Several refactors and code optimizations.
145
 
146
  = 4.5.5 =
147
+ * Fixed: Prevent collision with other plugins when authenticating AJAX-calls.
148
 
149
  = 4.5.4 | August 18th, 2021 =
150
  * Security: Access to the Download API now requires a valid nonce to prevent CSRF.
151
  * Security: Added authentication to Empty Cache Directory AJAX-call.
152
 
153
  = 4.5.3 | August 17th, 2021 =
154
+ * Fixed: "Too few arguments to function OmgfPro_Frontend_AutoReplace::passthru_handle()" would occur if OMGF Pro was updated to v2.5.1 before OMGF was updated to v4.5.2.
155
  * Security: Added checks to prevent path traversal and CSRF in Empty Cache Directory AJAX call.
156
 
157
  = 4.5.2 | August 16th, 2021 =
158
  * Pro Feature: Added promo material for @font-face detection in local stylesheets.
159
+ * Fixed: Fixed several warnings and notices.
160
 
161
  = 4.5.1 | August 2nd, 2021 =
162
+ * Enhanced: Added post update notice to inform user of the plugin's database changes. The current notice you were viewed was simply, because the current DB version wasn't logged yet on your system. So if you're reading this: Ha! Made you look! ;)
163
  * Pro Feature: Added promo material for Fallback Font Stack (Pro) feature.
164
+ * Enhanced: moved Stylesheet Generator to its own backend API.
165
+ * Enhanced: moved Font Downloader to its own backend API.
166
+ * Enhanced: Updated description of Optimization Modes.
167
+ * Fixed: Fixed glitch in footer news ticker.
168
+ * Enhanced: Added several filter and action hooks to allow a more seamless integration with OMGF Pro and OMGF Additional Fonts.
169
  * Several code and performance optimizations.
170
 
171
  = 4.5.0 | July 28th, 2021 =