Version Description
- (Vendor/Yoast) Fixed issue with empty Open Graph description.
- (Updater) Missing assets in the ZIP file.
Download this release
Release Info
Developer | tivnet |
Plugin | WPGlobus – Multilingual Everything! |
Version | 2.6.3 |
Comparing to | |
See all releases |
Code changes from version 2.6.2 to 2.6.3
- data/wpglobus-product-info.json +1 -1
- includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php +1605 -1585
- languages/wpglobus.pot +3 -3
- readme.txt +4 -0
- vendor/tivwp/updater/assets/css/fix-info-sections.css +7 -0
- vendor/tivwp/updater/assets/css/tivwp-updater.css +18 -0
- vendor/tivwp/updater/assets/js/tivwp-updater.js +9 -0
- wpglobus.php +2 -2
data/wpglobus-product-info.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"multilingual-woocommerce-nets-netaxept":{"title":"{:en}Multilingual WooCommerce Nets Netaxept{:}{:ru}\u041c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce Nets Netaxept{:}","_api_new_version":"1.0.3","_api_tested_up_to":"4.9.8"},"wpglobus-menu-visibility":{"title":"WPGlobus Menu Visibility","_api_new_version":"1.2.0","_api_tested_up_to":"4.9.6"},"wpglobus-multi-currency":{"title":"{:en}Multi-Currency for WooCommerce{:}{:ru}WPGlobus - \u041c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce{:}","_api_new_version":"1.1.1","_api_tested_up_to":"4.9.4"},"wpglobus-mobile-menu":{"title":"{:en}WPGlobus Mobile Menu{:}{:ru}WPGlobus Mobile Menu{:}","_api_new_version":"2.2.0","_api_tested_up_to":"5.6"},"wpglobus-header-images":{"title":"{:en}WPGlobus Header Images{:}{:ru}WPGlobus Header Images{:}","_api_new_version":"2.1.0","_api_tested_up_to":"5.5"},"wpglobus-for-bridge-theme":{"title":"{:en}WPGlobus for the \"Bridge\" theme{:}{:ru}WPGlobus \u0434\u043b\u044f \u0442\u0435\u043c\u044b Bridge{:}","_api_new_version":"2.3.0","_api_tested_up_to":"5.5"},"wpglobus-multilingual-notices":{"title":"{:en}WPGlobus Multilingual Notices{:}{:ru}WPGlobus - \u043c\u043d\u043e\u0433\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f{:}","_api_new_version":"2.2.0","_api_tested_up_to":"5.5"},"woocommerce-wpglobus":{"title":"{:en}WPGlobus for WooCommerce{:}{:ru}\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 WooCommerce WPGlobus{:}","_api_new_version":"4.2.0","_api_tested_up_to":"5.6"},"wpglobus-plus":{"title":"{:en}WPGlobus Plus multilingual extension{:}{:ru}WPGlobus \u041f\u043b\u044e\u0441{:}","_api_new_version":"1.5.2","_api_tested_up_to":"5.6"},"wpglobus-language-widgets":{"title":"{:en}WPGlobus Language Widgets{:}{:ru}\u042f\u0437\u044b\u043a\u0438 WPGlobus \u0434\u043b\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432{:}","_api_new_version":"2.0.0","_api_tested_up_to":"5.6.0"}}
|
1 |
+
{"multilingual-woocommerce-nets-netaxept":{"title":"{:en}Multilingual WooCommerce Nets Netaxept{:}{:ru}\u041c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce Nets Netaxept{:}","_api_new_version":"1.0.3","_api_tested_up_to":"4.9.8"},"wpglobus-menu-visibility":{"title":"WPGlobus Menu Visibility","_api_new_version":"1.2.0","_api_tested_up_to":"4.9.6"},"wpglobus-multi-currency":{"title":"{:en}Multi-Currency for WooCommerce{:}{:ru}WPGlobus - \u041c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce{:}","_api_new_version":"1.1.1","_api_tested_up_to":"4.9.4"},"wpglobus-mobile-menu":{"title":"{:en}WPGlobus Mobile Menu{:}{:ru}WPGlobus Mobile Menu{:}","_api_new_version":"2.2.0","_api_tested_up_to":"5.6"},"wpglobus-header-images":{"title":"{:en}WPGlobus Header Images{:}{:ru}WPGlobus Header Images{:}","_api_new_version":"2.1.0","_api_tested_up_to":"5.5"},"wpglobus-for-bridge-theme":{"title":"{:en}WPGlobus for the \"Bridge\" theme{:}{:ru}WPGlobus \u0434\u043b\u044f \u0442\u0435\u043c\u044b Bridge{:}","_api_new_version":"2.3.0","_api_tested_up_to":"5.5"},"wpglobus-multilingual-notices":{"title":"{:en}WPGlobus Multilingual Notices{:}{:ru}WPGlobus - \u043c\u043d\u043e\u0433\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f{:}","_api_new_version":"2.2.0","_api_tested_up_to":"5.5"},"woocommerce-wpglobus":{"title":"{:en}WPGlobus for WooCommerce{:}{:ru}\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 WooCommerce WPGlobus{:}","_api_new_version":"4.2.0","_api_tested_up_to":"5.6"},"wpglobus-plus":{"title":"{:en}WPGlobus Plus multilingual extension{:}{:ru}WPGlobus \u041f\u043b\u044e\u0441{:}","_api_new_version":"1.5.2","_api_tested_up_to":"5.6"},"wpglobus-language-widgets":{"title":"{:en}WPGlobus Language Widgets{:}{:ru}\u042f\u0437\u044b\u043a\u0438 WPGlobus \u0434\u043b\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432{:}","_api_new_version":"2.0.0","_api_tested_up_to":"5.6.0"},"wpglobus-for-ultimate-member":{"title":"{:en}WPGlobus for Ultimate Member{:}{:ru}WPGlobus \u0434\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430 Ultimate Member{:}","_api_new_version":"1.1.0","_api_tested_up_to":"5.6"}}
|
includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php
CHANGED
@@ -1,1586 +1,1606 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* File: class-wpglobus-yoastseo140.php
|
4 |
-
*
|
5 |
-
* Support of Yoast SEO 14.0
|
6 |
-
*
|
7 |
-
* @package WPGlobus\Vendor\YoastSEO
|
8 |
-
* @since 2.4
|
9 |
-
* @since 2.5.19 Added support multilingual fields for social tab.
|
10 |
-
*/
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Class WPGlobus_YoastSEO.
|
14 |
-
*/
|
15 |
-
class WPGlobus_YoastSEO {
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Yoast SEO separator.
|
19 |
-
*
|
20 |
-
* @var string
|
21 |
-
*/
|
22 |
-
public static $yoastseo_separator = '';
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Name of the script.
|
26 |
-
*
|
27 |
-
* @var string
|
28 |
-
*/
|
29 |
-
public static $handle_script = 'wpglobus-yoastseo';
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Name of the dashboard script.
|
33 |
-
*
|
34 |
-
* @since 2.4.5
|
35 |
-
* @var string
|
36 |
-
*/
|
37 |
-
public static $handle_script_dashboard = 'wpglobus-yoastseo-dashboard';
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Name of the premium script.
|
41 |
-
*
|
42 |
-
* @since 1.7.2
|
43 |
-
* @var string
|
44 |
-
*/
|
45 |
-
public static $handle_script_premium = 'wpglobus-yoastseo-premium';
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Current version yoast seo.
|
49 |
-
*
|
50 |
-
* @since 1.8
|
51 |
-
* @var string
|
52 |
-
*/
|
53 |
-
protected static $version = '';
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Contains wpseo post meta.
|
57 |
-
*
|
58 |
-
* @since 2.2.16
|
59 |
-
* @var null|array
|
60 |
-
*/
|
61 |
-
protected static $wpseo_meta = null;
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Contains wpseo taxonomy meta.
|
65 |
-
*
|
66 |
-
* @since 2.5.1
|
67 |
-
* @var null|array
|
68 |
-
*/
|
69 |
-
protected static $wpseo_taxonomy_meta = null;
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Contains document title.
|
73 |
-
*
|
74 |
-
* @since 2.4.7
|
75 |
-
* @var null|string
|
76 |
-
*/
|
77 |
-
protected static $title = null;
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Plus access.
|
81 |
-
*
|
82 |
-
* @since 2.2.20
|
83 |
-
* @var boolean|string
|
84 |
-
*/
|
85 |
-
protected static $plus_module = false;
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Canonical URLs.
|
89 |
-
*
|
90 |
-
* @since 2.5.11
|
91 |
-
* @var array
|
92 |
-
*/
|
93 |
-
protected static $canonical_url = array();
|
94 |
-
|
95 |
-
/**
|
96 |
-
*
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
/**
|
143 |
-
*
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
*
|
159 |
-
* @since 2.
|
160 |
-
*/
|
161 |
-
add_filter( '
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
*
|
168 |
-
* @since 2.5.19
|
169 |
-
*/
|
170 |
-
add_filter( '
|
171 |
-
add_filter( '
|
172 |
-
add_filter( '
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
*
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
* @
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
return WPGlobus_Core::extract_text( self::$title, WPGlobus::Config()->language );
|
252 |
-
}
|
253 |
-
|
254 |
-
/**
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
*
|
291 |
-
*
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
$
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
$
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
*
|
631 |
-
*
|
632 |
-
*
|
633 |
-
* @
|
634 |
-
*
|
635 |
-
* @
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
$description =
|
709 |
-
}
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
*
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
*
|
970 |
-
*
|
971 |
-
* @
|
972 |
-
*
|
973 |
-
* @
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
'
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
}
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
)
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
'
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
'
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
'
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
*
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
$graph_piece['
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
}
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
|
1577 |
-
|
1578 |
-
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1586 |
# --- EOF
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* File: class-wpglobus-yoastseo140.php
|
4 |
+
*
|
5 |
+
* Support of Yoast SEO 14.0
|
6 |
+
*
|
7 |
+
* @package WPGlobus\Vendor\YoastSEO
|
8 |
+
* @since 2.4
|
9 |
+
* @since 2.5.19 Added support multilingual fields for social tab.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Class WPGlobus_YoastSEO.
|
14 |
+
*/
|
15 |
+
class WPGlobus_YoastSEO {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Yoast SEO separator.
|
19 |
+
*
|
20 |
+
* @var string
|
21 |
+
*/
|
22 |
+
public static $yoastseo_separator = '';
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Name of the script.
|
26 |
+
*
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
public static $handle_script = 'wpglobus-yoastseo';
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Name of the dashboard script.
|
33 |
+
*
|
34 |
+
* @since 2.4.5
|
35 |
+
* @var string
|
36 |
+
*/
|
37 |
+
public static $handle_script_dashboard = 'wpglobus-yoastseo-dashboard';
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Name of the premium script.
|
41 |
+
*
|
42 |
+
* @since 1.7.2
|
43 |
+
* @var string
|
44 |
+
*/
|
45 |
+
public static $handle_script_premium = 'wpglobus-yoastseo-premium';
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Current version yoast seo.
|
49 |
+
*
|
50 |
+
* @since 1.8
|
51 |
+
* @var string
|
52 |
+
*/
|
53 |
+
protected static $version = '';
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Contains wpseo post meta.
|
57 |
+
*
|
58 |
+
* @since 2.2.16
|
59 |
+
* @var null|array
|
60 |
+
*/
|
61 |
+
protected static $wpseo_meta = null;
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Contains wpseo taxonomy meta.
|
65 |
+
*
|
66 |
+
* @since 2.5.1
|
67 |
+
* @var null|array
|
68 |
+
*/
|
69 |
+
protected static $wpseo_taxonomy_meta = null;
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Contains document title.
|
73 |
+
*
|
74 |
+
* @since 2.4.7
|
75 |
+
* @var null|string
|
76 |
+
*/
|
77 |
+
protected static $title = null;
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Plus access.
|
81 |
+
*
|
82 |
+
* @since 2.2.20
|
83 |
+
* @var boolean|string
|
84 |
+
*/
|
85 |
+
protected static $plus_module = false;
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Canonical URLs.
|
89 |
+
*
|
90 |
+
* @since 2.5.11
|
91 |
+
* @var array
|
92 |
+
*/
|
93 |
+
protected static $canonical_url = array();
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Description meta value.
|
97 |
+
*
|
98 |
+
* @scope front
|
99 |
+
* @since 2.6.3
|
100 |
+
* @var string
|
101 |
+
*/
|
102 |
+
protected static $description = '';
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Static "controller"
|
106 |
+
*/
|
107 |
+
public static function controller($version, $plus_module = false) {
|
108 |
+
|
109 |
+
self::$version = $version;
|
110 |
+
self::$plus_module = $plus_module;
|
111 |
+
|
112 |
+
if ( is_admin() ) {
|
113 |
+
|
114 |
+
/**
|
115 |
+
* @since 2.2.20
|
116 |
+
*/
|
117 |
+
add_action( 'admin_print_scripts', array(
|
118 |
+
__CLASS__,
|
119 |
+
'action__admin_print_scripts'
|
120 |
+
) );
|
121 |
+
|
122 |
+
if ( WPGlobus_WP::is_pagenow( 'edit.php' ) ) {
|
123 |
+
|
124 |
+
/**
|
125 |
+
* To translate Yoast columns on `edit.php` page.
|
126 |
+
* @since 2.2.16
|
127 |
+
*/
|
128 |
+
add_filter( 'wpseo_title', array(
|
129 |
+
__CLASS__,
|
130 |
+
'filter__wpseo_title'
|
131 |
+
), 5 );
|
132 |
+
|
133 |
+
|
134 |
+
add_filter( 'wpseo_metadesc', array(
|
135 |
+
__CLASS__,
|
136 |
+
'filter__wpseo_metadesc'
|
137 |
+
), 5 );
|
138 |
+
}
|
139 |
+
|
140 |
+
} else {
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Frontend.
|
144 |
+
*/
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Filter SEO title and meta description on front only, when the page header HTML tags are generated.
|
148 |
+
* AJAX is probably not required (waiting for a case).
|
149 |
+
*/
|
150 |
+
// add_filter( 'wpseo_title', array( __CLASS__, 'filter__title' ), PHP_INT_MAX );
|
151 |
+
/**
|
152 |
+
* Filter title description.
|
153 |
+
* @since 2.5.22
|
154 |
+
*/
|
155 |
+
add_filter( 'wpseo_title', array( __CLASS__, 'filter_front__title' ), PHP_INT_MAX, 2 );
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Filter meta description.
|
159 |
+
* @since 2.4
|
160 |
+
*/
|
161 |
+
add_filter( 'wpseo_metadesc', array( __CLASS__, 'filter_front__description' ), 5, 2 );
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Open Graph.
|
165 |
+
* @since 2.4 Open Graph title.
|
166 |
+
* @since 2.4 Open Graph description.
|
167 |
+
* @since 2.4 Open Graph URL.
|
168 |
+
* @since 2.5.19 Open Graph image.
|
169 |
+
*/
|
170 |
+
add_filter( 'wpseo_opengraph_title', array( __CLASS__, 'filter_front__opengraph_title' ), 5, 2 );
|
171 |
+
add_filter( 'wpseo_opengraph_desc', array( __CLASS__, 'filter_front__opengraph_description' ), 5, 2 );
|
172 |
+
add_filter( 'wpseo_opengraph_image', array( __CLASS__, 'filter_front__opengraph_image' ), 5, 2 );
|
173 |
+
add_filter( 'wpseo_opengraph_url', array( __CLASS__, 'filter_front__localize_url' ), 5, 2 );
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Twitter.
|
177 |
+
* @since 2.5.19
|
178 |
+
*/
|
179 |
+
add_filter( 'wpseo_twitter_title', array( __CLASS__, 'filter_front__twitter_title' ), 5, 2 );
|
180 |
+
add_filter( 'wpseo_twitter_description', array( __CLASS__, 'filter_front__twitter_description' ), 5, 2 );
|
181 |
+
add_filter( 'wpseo_twitter_image', array( __CLASS__, 'filter_front__twitter_image' ), 5, 2 );
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Filter canonical URL and open graph URL.
|
185 |
+
* @since 2.4
|
186 |
+
*/
|
187 |
+
add_filter( 'wpseo_canonical', array( __CLASS__, 'filter_front__localize_url' ), 5, 2 );
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Filter of the rel prev and next URL put out by Yoast SEO.
|
191 |
+
* @since 2.5.11
|
192 |
+
*/
|
193 |
+
add_filter( 'wpseo_adjacent_rel_url', array( __CLASS__, 'filter_front__wpseo_adjacent_rel_url' ), 5, 3 );
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Filter the HTML output of the Yoast SEO breadcrumbs class.
|
197 |
+
* @since 2.4.2
|
198 |
+
*/
|
199 |
+
add_filter( 'wpseo_breadcrumb_output', array( __CLASS__, 'filter__breadcrumb_output' ), 5, 2 );
|
200 |
+
|
201 |
+
/**
|
202 |
+
* @todo check for '_yoast_wpseo_title' meta
|
203 |
+
* @see <title> view-source:http://test/test-post-seo/
|
204 |
+
* @see <title> view-source:http://test/ru/test-post-seo/
|
205 |
+
*/
|
206 |
+
add_filter( 'get_post_metadata', array( __CLASS__, 'filter__get_post_metadata' ), 6, 4 );
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Filter meta keywords.
|
210 |
+
* @since 1.8.8
|
211 |
+
*/
|
212 |
+
add_filter( 'wpseo_metakeywords', array( __CLASS__, 'filter__metakeywords' ), 0 );
|
213 |
+
|
214 |
+
/**
|
215 |
+
* Filter `wpseo_schema_breadcrumb` generator.
|
216 |
+
* @since 2.4.7
|
217 |
+
*/
|
218 |
+
add_filter( 'wpseo_schema_breadcrumb', array( __CLASS__, 'filter__wpseo_schema_breadcrumb' ), 5, 2 );
|
219 |
+
|
220 |
+
/**
|
221 |
+
* Filter `wpseo_schema_webpage` generator.
|
222 |
+
* @since 2.4.14
|
223 |
+
*/
|
224 |
+
add_filter( 'wpseo_schema_webpage', array( __CLASS__, 'filter__wpseo_schema_webpage' ), 5, 2 );
|
225 |
+
}
|
226 |
+
}
|
227 |
+
|
228 |
+
/**
|
229 |
+
* obsolete @since 2.5.22
|
230 |
+
* Filter Yoast post meta title.
|
231 |
+
*
|
232 |
+
* @scope front
|
233 |
+
* @since 1.9.18
|
234 |
+
* @since 2.4.7 Handle multilingual title from `postmeta` table.
|
235 |
+
*
|
236 |
+
* @param string $title Post title.
|
237 |
+
*
|
238 |
+
* @return string.
|
239 |
+
*/
|
240 |
+
public static function filter__title( $title ) {
|
241 |
+
|
242 |
+
/**
|
243 |
+
* In some cases we can get $title like {:en}En title{:}{:ru}Ru title{:}{:fr}Fr title{:} - SiteTitle
|
244 |
+
* so, let's filter.
|
245 |
+
*/
|
246 |
+
if ( WPGlobus_Core::has_translations($title) ) {
|
247 |
+
|
248 |
+
if ( is_null( self::$title ) ) {
|
249 |
+
self::$title = $title;
|
250 |
+
}
|
251 |
+
return WPGlobus_Core::extract_text( self::$title, WPGlobus::Config()->language );
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* We can get title in last saved language (has no multilingual) from @see `wp_yoast_indexable` table.
|
256 |
+
* So, we need get multilingual title from `postmeta` table.
|
257 |
+
* @since 2.4.7
|
258 |
+
*/
|
259 |
+
if ( ! is_null( self::$title ) ) {
|
260 |
+
return WPGlobus_Core::extract_text( self::$title, WPGlobus::Config()->language );
|
261 |
+
}
|
262 |
+
|
263 |
+
/** @global wpdb $wpdb */
|
264 |
+
global $wpdb;
|
265 |
+
|
266 |
+
/** @global WP_Post $post */
|
267 |
+
global $post;
|
268 |
+
|
269 |
+
/**
|
270 |
+
* @since 2.4.14 Fixed PHP Notice: Trying to get property 'ID' of non-object.
|
271 |
+
*/
|
272 |
+
if ( $post instanceof WP_Post && (int) $post->ID > 0 ) {
|
273 |
+
$query = $wpdb->prepare(
|
274 |
+
"SELECT meta_value FROM {$wpdb->prefix}postmeta AS m WHERE m.post_id = %s AND m.meta_key = %s",
|
275 |
+
$post->ID,
|
276 |
+
'_yoast_wpseo_title'
|
277 |
+
);
|
278 |
+
|
279 |
+
$meta = $wpdb->get_var($query);
|
280 |
+
if ( ! empty($meta) && false != mb_strpos($meta, $title) && WPGlobus_Core::has_translations($meta) ) {
|
281 |
+
self::$title = $meta;
|
282 |
+
return WPGlobus_Core::extract_text( self::$title, WPGlobus::Config()->language );
|
283 |
+
}
|
284 |
+
}
|
285 |
+
|
286 |
+
return $title;
|
287 |
+
}
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Filter for changing the Yoast SEO generated Open Graph description.
|
291 |
+
*
|
292 |
+
* @see wordpress-seo\src\presenters\open-graph\description-presenter.php
|
293 |
+
*
|
294 |
+
* @since 2.5.19
|
295 |
+
*
|
296 |
+
* @scope front
|
297 |
+
* @param string $description The description.
|
298 |
+
* @param Indexable_Presentation $presentation The presentation of an indexable.
|
299 |
+
*
|
300 |
+
* @return string
|
301 |
+
*/
|
302 |
+
public static function filter_front__opengraph_description( $description, $presentation ) {
|
303 |
+
|
304 |
+
if ( empty( $description ) ) {
|
305 |
+
return $description;
|
306 |
+
}
|
307 |
+
|
308 |
+
if ( 'post' == $presentation->model->object_type ) {
|
309 |
+
|
310 |
+
$meta_cache = wp_cache_get( $presentation->model->object_id, 'post_meta' );
|
311 |
+
|
312 |
+
if ( ! empty( $meta_cache['_yoast_wpseo_opengraph-description'][0] ) ) {
|
313 |
+
|
314 |
+
$description = WPGlobus_Core::text_filter( $meta_cache['_yoast_wpseo_opengraph-description'][0], WPGlobus::Config()->language );
|
315 |
+
|
316 |
+
if ( $presentation->source instanceof WP_Post ) {
|
317 |
+
/**
|
318 |
+
* @see wordpress-seo\inc\wpseo-functions.php
|
319 |
+
*/
|
320 |
+
$description = wpseo_replace_vars( $description, $presentation->source );
|
321 |
+
}
|
322 |
+
} else {
|
323 |
+
/**
|
324 |
+
* Opengraph description is empty. We get it from `description` meta.
|
325 |
+
* @since 2.6.3
|
326 |
+
*/
|
327 |
+
$description = self::$description;
|
328 |
+
}
|
329 |
+
|
330 |
+
} elseif ( 'term' == $presentation->model->object_type ) {
|
331 |
+
|
332 |
+
/**
|
333 |
+
* Taxonomy.
|
334 |
+
*/
|
335 |
+
$__desc = self::get_taxonomy_meta( $presentation->model->object_sub_type, $presentation->model->object_id, 'wpseo_desc' );
|
336 |
+
|
337 |
+
if ( empty( $__desc ) ) {
|
338 |
+
|
339 |
+
$__template = self::get_option( 'wpseo_titles', 'metadesc-tax-' . $presentation->model->object_sub_type );
|
340 |
+
|
341 |
+
if ( ! empty( $__template ) ) {
|
342 |
+
$__desc = $__template;
|
343 |
+
} else {
|
344 |
+
// @W.I.P if empty `Meta description` from Yoast, then we need output `Description` from Edit taxonomy page.
|
345 |
+
$__desc = $presentation->source->description;
|
346 |
+
}
|
347 |
+
|
348 |
+
}
|
349 |
+
|
350 |
+
$description = wpseo_replace_vars( $__desc, $presentation->source );
|
351 |
+
}
|
352 |
+
|
353 |
+
return $description;
|
354 |
+
}
|
355 |
+
|
356 |
+
/**
|
357 |
+
* Filter for changing the Open Graph image.
|
358 |
+
*
|
359 |
+
* @see wordpress-seo\src\presenters\open-graph\image-presenter.php
|
360 |
+
*
|
361 |
+
* @since 2.5.19
|
362 |
+
*
|
363 |
+
* @scope front
|
364 |
+
* @param string $image_url The URL of the Open Graph image.
|
365 |
+
* @param Indexable_Presentation $presentation The presentation of an indexable.
|
366 |
+
*
|
367 |
+
* @return string
|
368 |
+
*/
|
369 |
+
public static function filter_front__opengraph_image( $image_url, $presentation ) {
|
370 |
+
|
371 |
+
if ( empty( $image_url) ) {
|
372 |
+
return $image_url;
|
373 |
+
}
|
374 |
+
|
375 |
+
if ( 'post' == $presentation->model->object_type ) {
|
376 |
+
|
377 |
+
$meta_cache = wp_cache_get( $presentation->model->object_id, 'post_meta' );
|
378 |
+
|
379 |
+
if ( ! empty( $meta_cache['_yoast_wpseo_opengraph-image'][0] ) ) {
|
380 |
+
|
381 |
+
$image_url = WPGlobus_Core::text_filter( $meta_cache['_yoast_wpseo_opengraph-image'][0], WPGlobus::Config()->language );
|
382 |
+
|
383 |
+
if ( $presentation->source instanceof WP_Post ) {
|
384 |
+
/**
|
385 |
+
* @see wordpress-seo\inc\wpseo-functions.php
|
386 |
+
*/
|
387 |
+
$image_url = wpseo_replace_vars( $image_url, $presentation->source );
|
388 |
+
}
|
389 |
+
}
|
390 |
+
}
|
391 |
+
|
392 |
+
return $image_url;
|
393 |
+
}
|
394 |
+
|
395 |
+
/**
|
396 |
+
* Filter for changing the Twitter title.
|
397 |
+
*
|
398 |
+
* @see wordpress-seo\src\presenters\twitter\title-presenter.php
|
399 |
+
*
|
400 |
+
* @since 2.5.19
|
401 |
+
*
|
402 |
+
* @scope front
|
403 |
+
* @param string $title The Twitter title.
|
404 |
+
* @param Indexable_Presentation $presentation The presentation of an indexable.
|
405 |
+
*
|
406 |
+
* @return string
|
407 |
+
*/
|
408 |
+
public static function filter_front__twitter_title( $title, $presentation ) {
|
409 |
+
|
410 |
+
if ( empty( $title ) ) {
|
411 |
+
return $title;
|
412 |
+
}
|
413 |
+
|
414 |
+
if ( 'post' == $presentation->model->object_type ) {
|
415 |
+
|
416 |
+
$meta_cache = wp_cache_get( $presentation->model->object_id, 'post_meta' );
|
417 |
+
|
418 |
+
if ( ! empty( $meta_cache['_yoast_wpseo_twitter-title'][0] ) ) {
|
419 |
+
|
420 |
+
$title = WPGlobus_Core::text_filter( $meta_cache['_yoast_wpseo_twitter-title'][0], WPGlobus::Config()->language );
|
421 |
+
|
422 |
+
if ( $presentation->source instanceof WP_Post ) {
|
423 |
+
/**
|
424 |
+
* @see wordpress-seo\inc\wpseo-functions.php
|
425 |
+
*/
|
426 |
+
$title = wpseo_replace_vars( $title, $presentation->source );
|
427 |
+
}
|
428 |
+
}
|
429 |
+
}
|
430 |
+
|
431 |
+
return $title;
|
432 |
+
}
|
433 |
+
|
434 |
+
/**
|
435 |
+
* Filter for changing the Twitter description as output in the Twitter card by Yoast SEO.
|
436 |
+
*
|
437 |
+
* @see wordpress-seo\src\presenters\twitter\description-presenter.php
|
438 |
+
*
|
439 |
+
* @since 2.5.19
|
440 |
+
*
|
441 |
+
* @scope front
|
442 |
+
* @param string $description The description string.
|
443 |
+
* @param Indexable_Presentation $presentation The presentation of an indexable.
|
444 |
+
*
|
445 |
+
* @return string
|
446 |
+
*/
|
447 |
+
public static function filter_front__twitter_description( $description, $presentation ) {
|
448 |
+
|
449 |
+
if ( empty( $description ) ) {
|
450 |
+
return $description;
|
451 |
+
}
|
452 |
+
|
453 |
+
if ( 'post' == $presentation->model->object_type ) {
|
454 |
+
|
455 |
+
$meta_cache = wp_cache_get( $presentation->model->object_id, 'post_meta' );
|
456 |
+
|
457 |
+
if ( ! empty( $meta_cache['_yoast_wpseo_twitter-description'][0] ) ) {
|
458 |
+
|
459 |
+
$description = WPGlobus_Core::text_filter( $meta_cache['_yoast_wpseo_twitter-description'][0], WPGlobus::Config()->language );
|
460 |
+
|
461 |
+
if ( $presentation->source instanceof WP_Post ) {
|
462 |
+
/**
|
463 |
+
* @see wordpress-seo\inc\wpseo-functions.php
|
464 |
+
*/
|
465 |
+
$description = wpseo_replace_vars( $description, $presentation->source );
|
466 |
+
}
|
467 |
+
}
|
468 |
+
}
|
469 |
+
|
470 |
+
return $description;
|
471 |
+
}
|
472 |
+
|
473 |
+
/**
|
474 |
+
* Filter for changing the Twitter Card image.
|
475 |
+
*
|
476 |
+
* @see wordpress-seo\src\presenters\twitter\image-presenter.php
|
477 |
+
*
|
478 |
+
* @since 2.5.19
|
479 |
+
*
|
480 |
+
* @scope front
|
481 |
+
* @param string $image Image URL string.
|
482 |
+
* @param Indexable_Presentation $presentation The presentation of an indexable.
|
483 |
+
*
|
484 |
+
* @return string
|
485 |
+
*/
|
486 |
+
public static function filter_front__twitter_image( $image, $presentation ) {
|
487 |
+
|
488 |
+
if ( empty( $image ) ) {
|
489 |
+
return $image;
|
490 |
+
}
|
491 |
+
|
492 |
+
if ( 'post' == $presentation->model->object_type ) {
|
493 |
+
|
494 |
+
$meta_cache = wp_cache_get( $presentation->model->object_id, 'post_meta' );
|
495 |
+
|
496 |
+
if ( ! empty( $meta_cache['_yoast_wpseo_twitter-image'][0] ) ) {
|
497 |
+
|
498 |
+
$image = WPGlobus_Core::text_filter( $meta_cache['_yoast_wpseo_twitter-image'][0], WPGlobus::Config()->language );
|
499 |
+
|
500 |
+
if ( $presentation->source instanceof WP_Post ) {
|
501 |
+
/**
|
502 |
+
* @see wordpress-seo\inc\wpseo-functions.php
|
503 |
+
*/
|
504 |
+
$image = wpseo_replace_vars( $image, $presentation->source );
|
505 |
+
}
|
506 |
+
}
|
507 |
+
}
|
508 |
+
|
509 |
+
return $image;
|
510 |
+
}
|
511 |
+
|
512 |
+
/**
|
513 |
+
* Filter for changing the Yoast SEO generated title.
|
514 |
+
*
|
515 |
+
* @see wordpress-seo\src\presenters\open-graph\title-presenter.php
|
516 |
+
*
|
517 |
+
* @since 2.5.19
|
518 |
+
*
|
519 |
+
* @scope front
|
520 |
+
* @param string $title The title.
|
521 |
+
* @param Indexable_Presentation $presentation The presentation of an indexable.
|
522 |
+
*
|
523 |
+
* @return string
|
524 |
+
*/
|
525 |
+
public static function filter_front__opengraph_title( $title, $presentation ) {
|
526 |
+
|
527 |
+
if ( empty( $title ) ) {
|
528 |
+
return $title;
|
529 |
+
}
|
530 |
+
|
531 |
+
if ( 'post' == $presentation->model->object_type ) {
|
532 |
+
|
533 |
+
$meta_cache = wp_cache_get( $presentation->model->object_id, 'post_meta' );
|
534 |
+
|
535 |
+
if ( ! empty( $meta_cache['_yoast_wpseo_opengraph-title'][0] ) ) {
|
536 |
+
|
537 |
+
$title = WPGlobus_Core::text_filter( $meta_cache['_yoast_wpseo_opengraph-title'][0], WPGlobus::Config()->language );
|
538 |
+
|
539 |
+
if ( $presentation->source instanceof WP_Post ) {
|
540 |
+
/**
|
541 |
+
* @see wordpress-seo\inc\wpseo-functions.php
|
542 |
+
*/
|
543 |
+
$title = wpseo_replace_vars( $title, $presentation->source );
|
544 |
+
}
|
545 |
+
|
546 |
+
} else {
|
547 |
+
|
548 |
+
/**
|
549 |
+
* @since 2.5.23
|
550 |
+
*/
|
551 |
+
if ( WPGlobus_Core::has_translations( $title ) ) {
|
552 |
+
$title = WPGlobus_Core::extract_text( $title, WPGlobus::Config()->language );
|
553 |
+
}
|
554 |
+
|
555 |
+
}
|
556 |
+
|
557 |
+
} elseif ( 'term' == $presentation->model->object_type ) {
|
558 |
+
|
559 |
+
/**
|
560 |
+
* Taxonomy.
|
561 |
+
*/
|
562 |
+
$__title = self::get_taxonomy_meta( $presentation->model->object_sub_type, $presentation->model->object_id, 'wpseo_title' );
|
563 |
+
|
564 |
+
if ( empty( $__title ) ) {
|
565 |
+
$__title = self::get_option( 'wpseo_titles', 'title-tax-' . $presentation->model->object_sub_type );
|
566 |
+
}
|
567 |
+
|
568 |
+
$title = wpseo_replace_vars( $__title, $presentation->source );
|
569 |
+
}
|
570 |
+
|
571 |
+
return $title;
|
572 |
+
}
|
573 |
+
|
574 |
+
/**
|
575 |
+
* Filter post meta.
|
576 |
+
*
|
577 |
+
* @since 1.9.21
|
578 |
+
* @since 2.1.3
|
579 |
+
* @see function function get_value() in wordpress-seo\inc\class-wpseo-meta.php
|
580 |
+
*/
|
581 |
+
public static function filter__get_post_metadata( $check, $object_id, $meta_key, $single ) {
|
582 |
+
|
583 |
+
global $post;
|
584 |
+
|
585 |
+
if ( $single ) {
|
586 |
+
return $check;
|
587 |
+
}
|
588 |
+
|
589 |
+
if ( ! is_object($post) ) {
|
590 |
+
return $check;
|
591 |
+
}
|
592 |
+
|
593 |
+
if ( $object_id != $post->ID ) {
|
594 |
+
return $check;
|
595 |
+
}
|
596 |
+
|
597 |
+
/**
|
598 |
+
* May be called many times on one page. Let's cache.
|
599 |
+
*/
|
600 |
+
static $_done = null;
|
601 |
+
if ( ! is_null($_done) ) {
|
602 |
+
return $check;
|
603 |
+
}
|
604 |
+
|
605 |
+
$meta_type = 'post';
|
606 |
+
|
607 |
+
$meta_cache = wp_cache_get($object_id, $meta_type . '_meta');
|
608 |
+
|
609 |
+
if ( ! empty($meta_cache['_yoast_wpseo_title'][0]) ) {
|
610 |
+
$meta_cache['_yoast_wpseo_title'][0] = WPGlobus_Core::text_filter( $meta_cache['_yoast_wpseo_title'][0], WPGlobus::Config()->language, WPGlobus::RETURN_EMPTY );
|
611 |
+
wp_cache_replace( $object_id, $meta_cache, $meta_type . '_meta' );
|
612 |
+
}
|
613 |
+
|
614 |
+
/**
|
615 |
+
* @since 2.2.33
|
616 |
+
*/
|
617 |
+
if ( ! empty($meta_cache['_yoast_wpseo_focuskw'][0]) ) {
|
618 |
+
$meta_cache['_yoast_wpseo_focuskw'][0] = WPGlobus_Core::text_filter( $meta_cache['_yoast_wpseo_focuskw'][0], WPGlobus::Config()->language, WPGlobus::RETURN_EMPTY );
|
619 |
+
wp_cache_replace( $object_id, $meta_cache, $meta_type . '_meta' );
|
620 |
+
}
|
621 |
+
|
622 |
+
$_done = true;
|
623 |
+
|
624 |
+
return $check;
|
625 |
+
}
|
626 |
+
|
627 |
+
/**
|
628 |
+
* Filter Yoast post meta keywords.
|
629 |
+
*
|
630 |
+
* @scope front
|
631 |
+
* @since 1.8.8
|
632 |
+
*
|
633 |
+
* @param string $keywords Multilingual keywords.
|
634 |
+
*
|
635 |
+
* @return string.
|
636 |
+
*/
|
637 |
+
public static function filter__metakeywords( $keywords ) {
|
638 |
+
if ( WPGlobus::Config()->language != WPGlobus::Config()->default_language ) {
|
639 |
+
return '';
|
640 |
+
}
|
641 |
+
return WPGlobus_Core::text_filter($keywords, WPGlobus::Config()->language, WPGlobus::RETURN_EMPTY);
|
642 |
+
}
|
643 |
+
|
644 |
+
/**
|
645 |
+
* Filter wpseo meta description.
|
646 |
+
*
|
647 |
+
* @see wordpress-seo\src\presenters\meta-description-presenter.php
|
648 |
+
* @see wordpress-seo\src\presenters\open-graph\description-presenter.php
|
649 |
+
*
|
650 |
+
* @since 2.4
|
651 |
+
* @since 2.5.1 Added support of taxonomies.
|
652 |
+
*
|
653 |
+
* @scope front
|
654 |
+
*
|
655 |
+
* @param string $meta_description Value from @see `description` field in `wp_yoast_indexable` table.
|
656 |
+
* @param Indexable_Presentation $presentation The presentation of an indexable.
|
657 |
+
*
|
658 |
+
* @return string
|
659 |
+
*/
|
660 |
+
public static function filter_front__description( $meta_description, $presentation ) {
|
661 |
+
|
662 |
+
/**
|
663 |
+
* $meta_description is received from `description` field in `wp_yoast_indexable` table.
|
664 |
+
*/
|
665 |
+
|
666 |
+
/**
|
667 |
+
* Init description.
|
668 |
+
*/
|
669 |
+
$description = '';
|
670 |
+
|
671 |
+
/**
|
672 |
+
* Key to define that `wpseo_metadesc` filter was already fired earlier.
|
673 |
+
*/
|
674 |
+
static $meta_description_presenter_was_fired = false;
|
675 |
+
|
676 |
+
if ( 'post' == $presentation->model->object_type ) {
|
677 |
+
|
678 |
+
/**
|
679 |
+
* Post.
|
680 |
+
*/
|
681 |
+
if ( $meta_description_presenter_was_fired ) {
|
682 |
+
/**
|
683 |
+
* Set meta description to empty value for `wpseo_opengraph_desc` filter like for empty $meta_description in `wpseo_metadesc` filter.
|
684 |
+
*/
|
685 |
+
$meta_description = '';
|
686 |
+
} else {
|
687 |
+
if ( empty($meta_description) ) {
|
688 |
+
$meta_description_presenter_was_fired = true;
|
689 |
+
}
|
690 |
+
}
|
691 |
+
|
692 |
+
$description = self::get_meta( '_yoast_wpseo_metadesc', $meta_description );
|
693 |
+
|
694 |
+
} elseif ( 'term' == $presentation->model->object_type ) {
|
695 |
+
|
696 |
+
/**
|
697 |
+
* Taxonomy.
|
698 |
+
* @since 2.5.1
|
699 |
+
*/
|
700 |
+
if ( $meta_description_presenter_was_fired ) {
|
701 |
+
|
702 |
+
/**
|
703 |
+
* This is `wpseo_opengraph_desc` filter with empty yoast description.
|
704 |
+
* @todo maybe need to use cache for term object.
|
705 |
+
*/
|
706 |
+
$term = get_term( $presentation->model->object_id );
|
707 |
+
if ( $term instanceof WP_Term ) {
|
708 |
+
$description = $term->description;
|
709 |
+
} else {
|
710 |
+
$description = '';
|
711 |
+
}
|
712 |
+
|
713 |
+
} else {
|
714 |
+
|
715 |
+
/**
|
716 |
+
* @since 2.5.22
|
717 |
+
*/
|
718 |
+
$description = self::get_taxonomy_meta( $presentation->model->object_sub_type, $presentation->model->object_id, 'wpseo_desc' );
|
719 |
+
|
720 |
+
if ( empty($description) ) {
|
721 |
+
$meta_description_presenter_was_fired = true;
|
722 |
+
} else {
|
723 |
+
$description = wpseo_replace_vars( $description, $presentation->source );
|
724 |
+
}
|
725 |
+
}
|
726 |
+
}
|
727 |
+
|
728 |
+
/**
|
729 |
+
* @since 2.6.3
|
730 |
+
*/
|
731 |
+
self::$description = $description;
|
732 |
+
|
733 |
+
return $description;
|
734 |
+
}
|
735 |
+
|
736 |
+
/**
|
737 |
+
* Filter canonical URL and open graph URL put out by Yoast SEO.
|
738 |
+
*
|
739 |
+
* @see wordpress-seo\src\presenters\canonical-presenter.php
|
740 |
+
* @see wordpress-seo\src\presenters\open-graph\url-presenter.php
|
741 |
+
* @scope front
|
742 |
+
* @since 2.4
|
743 |
+
* @since 2.5.1 Added support of taxonomies.
|
744 |
+
* @since 2.5.10 Added `wpglobus_wpseo_localize_url` filter.
|
745 |
+
*
|
746 |
+
* @param string $url The canonical URL or open graph URL.
|
747 |
+
* @param Indexable_Presentation $presentation The presentation of an indexable.
|
748 |
+
*
|
749 |
+
* @return string
|
750 |
+
*/
|
751 |
+
public static function filter_front__localize_url( $url, $presentation ) {
|
752 |
+
/**
|
753 |
+
* URL is received from `permalink` field in `wp_yoast_indexable` table.
|
754 |
+
*/
|
755 |
+
if ( WPGlobus::Config()->language == WPGlobus::Config()->default_language ) {
|
756 |
+
return $url;
|
757 |
+
}
|
758 |
+
|
759 |
+
$tag = false;
|
760 |
+
if ( is_singular() ) {
|
761 |
+
$tag = 'singular';
|
762 |
+
} elseif ( is_category() ) {
|
763 |
+
$tag = 'category';
|
764 |
+
} elseif ( is_tag() ) {
|
765 |
+
$tag = 'tag';
|
766 |
+
} elseif ( is_tax() ) {
|
767 |
+
$tag = 'tax';
|
768 |
+
}
|
769 |
+
|
770 |
+
if ( $tag ) {
|
771 |
+
|
772 |
+
$language =WPGlobus::Config()->language;
|
773 |
+
|
774 |
+
self::$canonical_url[ WPGlobus::Config()->default_language ] = $url;
|
775 |
+
|
776 |
+
/**
|
777 |
+
* Filters for a localized url.
|
778 |
+
*
|
779 |
+
* @since 2.5.10
|
780 |
+
*
|
781 |
+
* @param string $url Localized URL.
|
782 |
+
* @param string $language Current language.
|
783 |
+
* @param string $tag Conditional Tag.
|
784 |
+
*/
|
785 |
+
self::$canonical_url[ $language ] = apply_filters( 'wpglobus_wpseo_localize_url', WPGlobus_Utils::localize_url( $url, $language ), $language, $tag );
|
786 |
+
|
787 |
+
self::$canonical_url[ $language ] = urldecode( self::$canonical_url[ $language ] );
|
788 |
+
|
789 |
+
return self::$canonical_url[ $language ];
|
790 |
+
}
|
791 |
+
|
792 |
+
return $url;
|
793 |
+
}
|
794 |
+
|
795 |
+
/**
|
796 |
+
* Filtering of the rel `prev` and `next` URL put out by Yoast SEO.
|
797 |
+
*
|
798 |
+
* @see wordpress-seo\src\presenters\rel-prev-presenter.php
|
799 |
+
* @see wordpress-seo\src\presenters\rel-next-presenter.php
|
800 |
+
* @scope front
|
801 |
+
*
|
802 |
+
* @since 2.5.11
|
803 |
+
*
|
804 |
+
* @param string $url Link relationship, prev or next.
|
805 |
+
* @param string $relationship `prev` or `next`.
|
806 |
+
* @param Indexable_Presentation $presentation The presentation of an indexable.
|
807 |
+
*
|
808 |
+
* @return string
|
809 |
+
*/
|
810 |
+
public static function filter_front__wpseo_adjacent_rel_url( $link, $relationship, $presentation ) {
|
811 |
+
|
812 |
+
if ( empty( $link ) || WPGlobus::Config()->language == WPGlobus::Config()->default_language ) {
|
813 |
+
return $link;
|
814 |
+
}
|
815 |
+
|
816 |
+
if ( empty( self::$canonical_url ) ) {
|
817 |
+
return $link;
|
818 |
+
}
|
819 |
+
|
820 |
+
return str_replace(
|
821 |
+
self::$canonical_url[ WPGlobus::Config()->default_language ],
|
822 |
+
self::$canonical_url[ WPGlobus::Config()->language ],
|
823 |
+
$link
|
824 |
+
);
|
825 |
+
}
|
826 |
+
|
827 |
+
/**
|
828 |
+
* Filter the HTML output of the Yoast SEO breadcrumbs class.
|
829 |
+
*
|
830 |
+
* @see wordpress-seo\src\presenters\breadcrumbs-presenter.php
|
831 |
+
* @scope front
|
832 |
+
* @since 2.4.2
|
833 |
+
*
|
834 |
+
* @param $output The HTML output
|
835 |
+
* @param Indexable_Presentation $presentation The presentation of an indexable.
|
836 |
+
*
|
837 |
+
* @api string $output The HTML output.
|
838 |
+
*
|
839 |
+
* @return string
|
840 |
+
*/
|
841 |
+
public static function filter__breadcrumb_output( $output, $presentation ) {
|
842 |
+
|
843 |
+
/** @global wpdb $wpdb */
|
844 |
+
global $wpdb;
|
845 |
+
|
846 |
+
$object_type = null;
|
847 |
+
$object_sub_type = null;
|
848 |
+
$object_order = null;
|
849 |
+
|
850 |
+
if ( $presentation->source instanceof WP_Post ) {
|
851 |
+
|
852 |
+
$object_type = 'post';
|
853 |
+
$object_sub_type = $presentation->source->post_type;
|
854 |
+
|
855 |
+
} elseif ( $presentation->source instanceof WP_Term ) {
|
856 |
+
|
857 |
+
$object_type = 'taxonomy';
|
858 |
+
$object_sub_type = $presentation->source->taxonomy;
|
859 |
+
|
860 |
+
if ( $presentation->source->parent == 0 ) {
|
861 |
+
$object_order = array($presentation->source->term_id);
|
862 |
+
} else {
|
863 |
+
$object_order = get_ancestors($presentation->source->term_id, $object_sub_type);
|
864 |
+
if ( count($object_order) > 1 ) {
|
865 |
+
$object_order = array_reverse( $object_order );
|
866 |
+
}
|
867 |
+
$object_order[] = $presentation->source->term_id;
|
868 |
+
}
|
869 |
+
|
870 |
+
}
|
871 |
+
|
872 |
+
$ids = array();
|
873 |
+
$breadcrumbs = array();
|
874 |
+
$i = 0;
|
875 |
+
|
876 |
+
foreach( $presentation->breadcrumbs as $order=>$piece ) {
|
877 |
+
|
878 |
+
if ( $order == 0 ) {
|
879 |
+
|
880 |
+
$_piece = '/' . preg_quote($piece['url'], '/') . '/';
|
881 |
+
|
882 |
+
if ( empty( $piece['id'] ) ) {
|
883 |
+
/**
|
884 |
+
* If homepage displays as latest posts, then we should force the setting of `Home` for all languages.
|
885 |
+
*/
|
886 |
+
$output = preg_replace( $_piece, home_url('/'), $output, 1 );
|
887 |
+
} else {
|
888 |
+
$output = preg_replace( $_piece, home_url('/'), $output, 1 );
|
889 |
+
}
|
890 |
+
|
891 |
+
if ( WPGlobus_Core::has_translations($piece['text']) ) {
|
892 |
+
$_home_text = WPGlobus_Core::text_filter( $piece['text'], WPGlobus::Config()->language, WPGlobus::RETURN_IN_DEFAULT_LANGUAGE );
|
893 |
+
$output = str_replace( $piece['text'], $_home_text, $output );
|
894 |
+
}
|
895 |
+
|
896 |
+
} else {
|
897 |
+
|
898 |
+
switch ($object_type) :
|
899 |
+
case 'post' :
|
900 |
+
if ( ! empty($piece['id']) ) {
|
901 |
+
$ids[] = $piece['id'];
|
902 |
+
$breadcrumbs[ $piece['id'] ] = $piece;
|
903 |
+
$breadcrumbs[ $piece['id'] ]['object_type'] = $object_type;
|
904 |
+
$breadcrumbs[ $piece['id'] ]['object_sub_type'] = $object_sub_type;
|
905 |
+
}
|
906 |
+
break;
|
907 |
+
case 'taxonomy' :
|
908 |
+
$_id = $order;
|
909 |
+
if ( ! is_null( $object_order ) ) {
|
910 |
+
$_id = $object_order[$i];
|
911 |
+
$ids[] = $_id;
|
912 |
+
}
|
913 |
+
$breadcrumbs[ $_id ] = $piece;
|
914 |
+
$breadcrumbs[ $_id ]['object_type'] = $object_type;
|
915 |
+
$breadcrumbs[ $_id ]['object_sub_type'] = $object_sub_type;
|
916 |
+
$i++;
|
917 |
+
break;
|
918 |
+
endswitch;
|
919 |
+
}
|
920 |
+
}
|
921 |
+
|
922 |
+
$query = null;
|
923 |
+
|
924 |
+
if ( ! empty($ids) ) {
|
925 |
+
|
926 |
+
$_ids = implode( ',', $ids );
|
927 |
+
switch ($object_type) :
|
928 |
+
case 'post' :
|
929 |
+
$select = $wpdb->prepare( "SELECT ID, post_title AS ml_title, post_name, post_type FROM $wpdb->posts WHERE ID IN ( %s )", $_ids );
|
930 |
+
$select = str_replace( "'", '', $select );
|
931 |
+
break;
|
932 |
+
case 'taxonomy' :
|
933 |
+
$select = $wpdb->prepare( "SELECT term_id, name AS ml_title, slug FROM $wpdb->terms WHERE term_id IN ( %s )", $_ids );
|
934 |
+
$select = str_replace( "'", '', $select );
|
935 |
+
break;
|
936 |
+
endswitch;
|
937 |
+
|
938 |
+
$query = $wpdb->get_results( $select, OBJECT_K );
|
939 |
+
|
940 |
+
foreach( $breadcrumbs as $id=>$piece ) {
|
941 |
+
|
942 |
+
$output = str_replace(
|
943 |
+
array(
|
944 |
+
$piece['url'],
|
945 |
+
$piece['text']
|
946 |
+
),
|
947 |
+
array(
|
948 |
+
WPGlobus_Utils::localize_url( $piece['url'], WPGlobus::Config()->language ),
|
949 |
+
WPGlobus_Core::text_filter( $query[$id]->ml_title, WPGlobus::Config()->language )
|
950 |
+
),
|
951 |
+
$output
|
952 |
+
);
|
953 |
+
}
|
954 |
+
}
|
955 |
+
|
956 |
+
/**
|
957 |
+
* @since 2.4.2 @W.I.P
|
958 |
+
*/
|
959 |
+
//$output = apply_filters( 'wpglobus_wpseo_breadcrumb_output', $output, $breadcrumbs, $query );
|
960 |
+
|
961 |
+
return $output;
|
962 |
+
}
|
963 |
+
|
964 |
+
/**
|
965 |
+
* Filter wpseo meta description.
|
966 |
+
*
|
967 |
+
* @see wordpress-seo\admin\class-meta-columns.php
|
968 |
+
* @scope admin
|
969 |
+
* @since 2.2.16
|
970 |
+
*
|
971 |
+
* @param string $metadesc_val Value in default language.
|
972 |
+
*
|
973 |
+
* @return string
|
974 |
+
*/
|
975 |
+
public static function filter__wpseo_metadesc( $metadesc_val ) {
|
976 |
+
|
977 |
+
if ( empty($metadesc_val) ) {
|
978 |
+
return $metadesc_val;
|
979 |
+
}
|
980 |
+
|
981 |
+
if ( WPGlobus::Config()->language == WPGlobus::Config()->default_language ) {
|
982 |
+
return $metadesc_val;
|
983 |
+
}
|
984 |
+
|
985 |
+
return self::get_meta( '_yoast_wpseo_metadesc', $metadesc_val );
|
986 |
+
}
|
987 |
+
|
988 |
+
/**
|
989 |
+
* To translate Yoast `column-wpseo-title`.
|
990 |
+
*
|
991 |
+
* @see wordpress-seo\admin\class-meta-columns.php
|
992 |
+
* @scope admin
|
993 |
+
* @since 2.2.16
|
994 |
+
*
|
995 |
+
* @param string $title
|
996 |
+
*
|
997 |
+
* @return string
|
998 |
+
*/
|
999 |
+
public static function filter__wpseo_title( $title ) {
|
1000 |
+
return WPGlobus_Core::extract_text( $title, WPGlobus::Config()->language );
|
1001 |
+
}
|
1002 |
+
|
1003 |
+
/**
|
1004 |
+
* Get meta for extra language.
|
1005 |
+
*
|
1006 |
+
* @scope admin
|
1007 |
+
* @since 2.2.16
|
1008 |
+
*/
|
1009 |
+
protected static function get_meta( $meta_key, $meta_value = '' ) {
|
1010 |
+
|
1011 |
+
if ( is_null(self::$wpseo_meta) ) {
|
1012 |
+
self::get_wpseo_meta();
|
1013 |
+
}
|
1014 |
+
|
1015 |
+
if ( empty( self::$wpseo_meta[ $meta_key ] ) ) {
|
1016 |
+
return '';
|
1017 |
+
}
|
1018 |
+
|
1019 |
+
/** @global WP_Post $post */
|
1020 |
+
global $post;
|
1021 |
+
|
1022 |
+
if ( empty( $meta_value ) ) {
|
1023 |
+
|
1024 |
+
/**
|
1025 |
+
* Try get meta by post ID.
|
1026 |
+
*/
|
1027 |
+
if ( ! $post instanceof WP_Post ) {
|
1028 |
+
return '';
|
1029 |
+
}
|
1030 |
+
if ( empty( self::$wpseo_meta[$meta_key][$post->ID] ) ) {
|
1031 |
+
return '';
|
1032 |
+
}
|
1033 |
+
|
1034 |
+
return WPGlobus_Core::text_filter( self::$wpseo_meta[$meta_key][$post->ID], WPGlobus::Config()->language, WPGlobus::RETURN_EMPTY );
|
1035 |
+
}
|
1036 |
+
|
1037 |
+
$_return_value = '';
|
1038 |
+
foreach( self::$wpseo_meta[ $meta_key ] as $_meta_value ) {
|
1039 |
+
if ( false !== strpos( $_meta_value, $meta_value ) ) {
|
1040 |
+
$_return_value = WPGlobus_Core::text_filter( $_meta_value, WPGlobus::Config()->language, WPGlobus::RETURN_EMPTY );
|
1041 |
+
break;
|
1042 |
+
}
|
1043 |
+
}
|
1044 |
+
|
1045 |
+
return $_return_value;
|
1046 |
+
}
|
1047 |
+
|
1048 |
+
/**
|
1049 |
+
* Get `_yoast_wpseo_metadesc`, `_yoast_wpseo_focuskw` meta.
|
1050 |
+
*
|
1051 |
+
* @scope both
|
1052 |
+
* @since 2.4
|
1053 |
+
* @since 2.4.6 Separate the defining of post type for frontend and admin.
|
1054 |
+
* @since 2.4.14 Revised code.
|
1055 |
+
*/
|
1056 |
+
protected static function get_wpseo_meta() {
|
1057 |
+
|
1058 |
+
/** @global wpdb $wpdb */
|
1059 |
+
global $wpdb;
|
1060 |
+
|
1061 |
+
/** @global WP_Post $post */
|
1062 |
+
global $post;
|
1063 |
+
|
1064 |
+
$post_id = false;
|
1065 |
+
|
1066 |
+
if ( is_admin() ) {
|
1067 |
+
|
1068 |
+
/**
|
1069 |
+
* Admin.
|
1070 |
+
*/
|
1071 |
+
if ( ! empty( $_GET['post'] ) ) {
|
1072 |
+
$post_id = sanitize_text_field( $_GET['post'] ); // phpcs:ignore WordPress.CSRF.NonceVerification
|
1073 |
+
}
|
1074 |
+
|
1075 |
+
} else {
|
1076 |
+
|
1077 |
+
if ( $post instanceof WP_Post ) {
|
1078 |
+
|
1079 |
+
/**
|
1080 |
+
* Front-end.
|
1081 |
+
*/
|
1082 |
+
$post_id = $post->ID;
|
1083 |
+
|
1084 |
+
}
|
1085 |
+
}
|
1086 |
+
|
1087 |
+
if ( $post_id ) {
|
1088 |
+
|
1089 |
+
$query = $wpdb->prepare(
|
1090 |
+
"SELECT p.ID, p.post_type, pm.meta_key, pm.meta_value FROM {$wpdb->prefix}posts AS p JOIN {$wpdb->prefix}postmeta AS pm ON p.ID = pm.post_id WHERE p.ID = %s AND (pm.meta_key = %s OR pm.meta_key = %s)",
|
1091 |
+
$post_id,
|
1092 |
+
'_yoast_wpseo_metadesc',
|
1093 |
+
'_yoast_wpseo_focuskw'
|
1094 |
+
);
|
1095 |
+
|
1096 |
+
$metas = $wpdb->get_results( $query, ARRAY_A );
|
1097 |
+
|
1098 |
+
if ( ! empty( $metas ) ) {
|
1099 |
+
foreach( $metas as $_meta ) {
|
1100 |
+
if ( ! isset( self::$wpseo_meta[ $_meta['meta_key'] ] ) ) {
|
1101 |
+
self::$wpseo_meta[ $_meta['meta_key'] ] = array();
|
1102 |
+
}
|
1103 |
+
self::$wpseo_meta[ $_meta['meta_key'] ][ $_meta['ID'] ] = $_meta['meta_value'];
|
1104 |
+
}
|
1105 |
+
}
|
1106 |
+
} else {
|
1107 |
+
// Here we can add code to get meta for multiple posts.
|
1108 |
+
}
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
/**
|
1112 |
+
* Get taxonomy meta from `wpseo_taxonomy_meta` option.
|
1113 |
+
*
|
1114 |
+
* @since 2.5.1
|
1115 |
+
* @since 2.5.22 Added $meta_key parameter to the `get_taxonomy_meta` function.
|
1116 |
+
* @scope front
|
1117 |
+
*
|
1118 |
+
* @param string $object_sub_type The Indexable Object sub type.
|
1119 |
+
* @param string $object_id The object ID.
|
1120 |
+
* @param Indexable_Presentation $meta_key The WPSEO meta key.
|
1121 |
+
*
|
1122 |
+
* return string | array
|
1123 |
+
*/
|
1124 |
+
protected static function get_taxonomy_meta( $object_sub_type, $object_id, $meta_key = '' ) {
|
1125 |
+
|
1126 |
+
if ( is_null( self::$wpseo_taxonomy_meta ) ) {
|
1127 |
+
self::$wpseo_taxonomy_meta = get_option( 'wpseo_taxonomy_meta' );
|
1128 |
+
}
|
1129 |
+
|
1130 |
+
if ( empty( self::$wpseo_taxonomy_meta[ $object_sub_type ][ $object_id ] ) ) {
|
1131 |
+
return '';
|
1132 |
+
}
|
1133 |
+
|
1134 |
+
if ( empty( $meta_key ) ) {
|
1135 |
+
return self::$wpseo_taxonomy_meta[ $object_sub_type ][ $object_id ];
|
1136 |
+
}
|
1137 |
+
|
1138 |
+
if ( empty( self::$wpseo_taxonomy_meta[ $object_sub_type ][ $object_id ][ $meta_key ] ) ) {
|
1139 |
+
return '';
|
1140 |
+
}
|
1141 |
+
|
1142 |
+
$meta_value = WPGlobus_Core::text_filter(
|
1143 |
+
self::$wpseo_taxonomy_meta[ $object_sub_type ][ $object_id ][ $meta_key ],
|
1144 |
+
WPGlobus::Config()->language,
|
1145 |
+
WPGlobus::RETURN_EMPTY
|
1146 |
+
);
|
1147 |
+
|
1148 |
+
return $meta_value;
|
1149 |
+
}
|
1150 |
+
|
1151 |
+
/**
|
1152 |
+
* Enqueue JS for YoastSEO support.
|
1153 |
+
*
|
1154 |
+
* @since 1.4.0
|
1155 |
+
* @since 2.2.20
|
1156 |
+
* @since 2.4.5 Add JS script on dashboard.
|
1157 |
+
*/
|
1158 |
+
public static function action__admin_print_scripts() {
|
1159 |
+
|
1160 |
+
if ( WPGlobus_WP::is_pagenow( 'admin.php' ) ) {
|
1161 |
+
|
1162 |
+
if ( 'wpseo_tools' == WPGlobus_Utils::safe_get('page') && 'bulk-editor' == WPGlobus_Utils::safe_get('tool') ) {
|
1163 |
+
|
1164 |
+
$wrng1 = '<div>' . esc_html__( 'Bulk editing of the multilingual titles and descriptions is not supported by the current version.', 'wpglobus' ) . '</div>';
|
1165 |
+
$wrng2 = '<div>' . esc_html__( 'Therefore, to avoid any data loss, we do not recommend using this.', 'wpglobus' ) . '</div>';
|
1166 |
+
|
1167 |
+
$i18n = array(
|
1168 |
+
'preWarning' => esc_html__( 'WPGlobus warning: ', 'wpglobus' ),
|
1169 |
+
'bulkEditorWarning' => $wrng1 . $wrng2,
|
1170 |
+
);
|
1171 |
+
|
1172 |
+
$src = WPGlobus::$PLUGIN_DIR_URL . 'includes/js/wpglobus-yoastseo-dashboard' . WPGlobus::SCRIPT_SUFFIX() . '.js';
|
1173 |
+
|
1174 |
+
wp_register_script(
|
1175 |
+
self::$handle_script_dashboard,
|
1176 |
+
$src,
|
1177 |
+
array( 'jquery' ),
|
1178 |
+
WPGLOBUS_VERSION,
|
1179 |
+
true
|
1180 |
+
);
|
1181 |
+
|
1182 |
+
wp_enqueue_script(self::$handle_script_dashboard);
|
1183 |
+
|
1184 |
+
wp_localize_script(
|
1185 |
+
self::$handle_script_dashboard,
|
1186 |
+
'WPGlobusYoastSeoDashboard',
|
1187 |
+
array(
|
1188 |
+
'version' => WPGLOBUS_VERSION,
|
1189 |
+
'wpseo_version' => WPSEO_VERSION,
|
1190 |
+
'pagenow' => 'admin.php',
|
1191 |
+
'page' => WPGlobus_Utils::safe_get('page'),
|
1192 |
+
'tool' => WPGlobus_Utils::safe_get('tool'),
|
1193 |
+
'i18n' => $i18n
|
1194 |
+
)
|
1195 |
+
);
|
1196 |
+
|
1197 |
+
return;
|
1198 |
+
}
|
1199 |
+
}
|
1200 |
+
|
1201 |
+
if ( 'off' === WPGlobus::Config()->toggle ) {
|
1202 |
+
return;
|
1203 |
+
}
|
1204 |
+
|
1205 |
+
if ( self::disabled_entity() ) {
|
1206 |
+
return;
|
1207 |
+
}
|
1208 |
+
|
1209 |
+
/** @global string $pagenow */
|
1210 |
+
global $pagenow;
|
1211 |
+
|
1212 |
+
$enabled_pages = array(
|
1213 |
+
'post.php',
|
1214 |
+
'post-new.php',
|
1215 |
+
'edit-tags.php',
|
1216 |
+
'term.php'
|
1217 |
+
);
|
1218 |
+
|
1219 |
+
if ( WPGlobus_WP::is_pagenow( $enabled_pages ) ) {
|
1220 |
+
|
1221 |
+
WPGlobus::O()->vendors_scripts['WPSEO'] = true;
|
1222 |
+
|
1223 |
+
if ( defined( 'WPSEO_PREMIUM_PLUGIN_FILE' ) ) {
|
1224 |
+
/**
|
1225 |
+
* @see wordpress-seo-premium\wp-seo-premium.php
|
1226 |
+
*/
|
1227 |
+
WPGlobus::O()->vendors_scripts['WPSEO_PREMIUM'] = true;
|
1228 |
+
}
|
1229 |
+
|
1230 |
+
$yoastseo_plus_readability_access = '';
|
1231 |
+
$yoastseo_plus_readability_inactive = '';
|
1232 |
+
|
1233 |
+
$yoastseo_plus_page_analysis_access = '';
|
1234 |
+
$yoastseo_plus_page_analysis_inactive = '';
|
1235 |
+
|
1236 |
+
$yoastseo_plus_meta_keywords_access = '';
|
1237 |
+
$yoastseo_plus_meta_keywords_inactive = '';
|
1238 |
+
|
1239 |
+
$yoastseo_plus_social_access = '';
|
1240 |
+
$yoastseo_plus_social_inactive = '';
|
1241 |
+
|
1242 |
+
if ( WPGlobus::Config()->builder->is_builder_page() ) {
|
1243 |
+
|
1244 |
+
$_url = '#';
|
1245 |
+
if ( class_exists('WPGlobusPlus') ) {
|
1246 |
+
/**
|
1247 |
+
* @see wpglobus-plus\includes\wpglobus-plus-main.php
|
1248 |
+
*/
|
1249 |
+
$_url = add_query_arg(
|
1250 |
+
array(
|
1251 |
+
'page' => 'wpglobus-plus-options'
|
1252 |
+
),
|
1253 |
+
admin_url('admin.php')
|
1254 |
+
);
|
1255 |
+
}
|
1256 |
+
|
1257 |
+
$yoastseo_plus_readability_access = sprintf(
|
1258 |
+
esc_html__( 'Please see %1s to get access to Analysis results in %2s with YoastSEO.', '' ),
|
1259 |
+
'<a href="https://wpglobus.com/product/wpglobus-plus/#yoastseo" target="_blank">WPGlobus Plus</a>',
|
1260 |
+
WPGlobus::Config()->en_language_name[ WPGlobus::Config()->builder->get_language() ]
|
1261 |
+
);
|
1262 |
+
$yoastseo_plus_readability_inactive = sprintf(
|
1263 |
+
esc_html__( 'Please activate %1sYoast SEO Plus%2s module to get access to Analysis results in %3s with YoastSEO.', '' ),
|
1264 |
+
'<a href="'.$_url.'">',
|
1265 |
+
'</a>',
|
1266 |
+
WPGlobus::Config()->en_language_name[ WPGlobus::Config()->builder->get_language() ]
|
1267 |
+
);
|
1268 |
+
|
1269 |
+
$yoastseo_plus_page_analysis_access = sprintf(
|
1270 |
+
esc_html__( 'Please see %1s to get access to Analysis results in %2s with YoastSEO.', '' ),
|
1271 |
+
'<a href="https://wpglobus.com/product/wpglobus-plus/#yoastseo" target="_blank">WPGlobus Plus</a>',
|
1272 |
+
WPGlobus::Config()->en_language_name[ WPGlobus::Config()->builder->get_language() ]
|
1273 |
+
);
|
1274 |
+
$yoastseo_plus_page_analysis_inactive = sprintf(
|
1275 |
+
esc_html__( 'Please activate %1sYoast SEO Plus%2s module to get access to Analysis results in %3s with YoastSEO.', '' ),
|
1276 |
+
'<a href="'.$_url.'">',
|
1277 |
+
'</a>',
|
1278 |
+
WPGlobus::Config()->en_language_name[ WPGlobus::Config()->builder->get_language() ]
|
1279 |
+
);
|
1280 |
+
|
1281 |
+
$yoastseo_plus_meta_keywords_access = sprintf(
|
1282 |
+
esc_html__( 'Please see %1s to get access to Focus keyphrase in %2s with YoastSEO.', '' ),
|
1283 |
+
'<a href="https://wpglobus.com/product/wpglobus-plus/#yoastseo" target="_blank">WPGlobus Plus</a>',
|
1284 |
+
WPGlobus::Config()->en_language_name[ WPGlobus::Config()->builder->get_language() ]
|
1285 |
+
);
|
1286 |
+
$yoastseo_plus_meta_keywords_inactive = sprintf(
|
1287 |
+
esc_html__( 'Please activate %1sYoast SEO Plus%2s module to get access to Focus keyphrase in %1s with YoastSEO.', '' ),
|
1288 |
+
'<a href="'.$_url.'">',
|
1289 |
+
'</a>',
|
1290 |
+
WPGlobus::Config()->en_language_name[ WPGlobus::Config()->builder->get_language() ]
|
1291 |
+
);
|
1292 |
+
|
1293 |
+
$yoastseo_plus_social_access = sprintf(
|
1294 |
+
esc_html__( 'Please see %1s to get access to Social Tab content in %2s with YoastSEO.', '' ),
|
1295 |
+
'<a href="https://wpglobus.com/product/wpglobus-plus/#yoastseo" target="_blank">WPGlobus Plus</a>',
|
1296 |
+
WPGlobus::Config()->en_language_name[ WPGlobus::Config()->builder->get_language() ]
|
1297 |
+
);
|
1298 |
+
$yoastseo_plus_social_inactive = sprintf(
|
1299 |
+
esc_html__( 'Please activate %1sYoast SEO Plus%2s module to get access to Social Tab content in %1s with YoastSEO.', '' ),
|
1300 |
+
'<a href="'.$_url.'">',
|
1301 |
+
'</a>',
|
1302 |
+
WPGlobus::Config()->en_language_name[ WPGlobus::Config()->builder->get_language() ]
|
1303 |
+
);
|
1304 |
+
}
|
1305 |
+
|
1306 |
+
$i18n = array(
|
1307 |
+
'yoastseo_plus_readability_access' => $yoastseo_plus_readability_access,
|
1308 |
+
'yoastseo_plus_readability_inactive' => $yoastseo_plus_readability_inactive,
|
1309 |
+
'yoastseo_plus_page_analysis_access' => $yoastseo_plus_page_analysis_access,
|
1310 |
+
'yoastseo_plus_page_analysis_inactive' => $yoastseo_plus_page_analysis_inactive,
|
1311 |
+
'yoastseo_plus_meta_keywords_access' => $yoastseo_plus_meta_keywords_access,
|
1312 |
+
'yoastseo_plus_meta_keywords_inactive' => $yoastseo_plus_meta_keywords_inactive,
|
1313 |
+
'yoastseo_plus_social_access' => $yoastseo_plus_social_access,
|
1314 |
+
'yoastseo_plus_social_inactive' => $yoastseo_plus_social_inactive
|
1315 |
+
);
|
1316 |
+
|
1317 |
+
$src_version = false;
|
1318 |
+
$src_version_premium = false;
|
1319 |
+
|
1320 |
+
if ( ! WPGlobus::O()->vendors_scripts['WPSEO_PREMIUM'] ) {
|
1321 |
+
|
1322 |
+
/** @noinspection PhpInternalEntityUsedInspection */
|
1323 |
+
$src_version = version_compare( WPSEO_VERSION, '4.0', '>=' ) ? '40' : $src_version;
|
1324 |
+
/** @noinspection PhpInternalEntityUsedInspection */
|
1325 |
+
$src_version = version_compare( WPSEO_VERSION, '4.1', '>=' ) ? '41' : $src_version;
|
1326 |
+
/** @noinspection PhpInternalEntityUsedInspection */
|
1327 |
+
$src_version = version_compare( WPSEO_VERSION, '4.4', '>=' ) ? '44' : $src_version;
|
1328 |
+
if (
|
1329 |
+
/** @noinspection PhpInternalEntityUsedInspection */
|
1330 |
+
version_compare( WPSEO_VERSION, '4.8', '>=' )
|
1331 |
+
) {
|
1332 |
+
$src_version = self::$version;
|
1333 |
+
}
|
1334 |
+
|
1335 |
+
} else {
|
1336 |
+
/**
|
1337 |
+
* Start with Yoast SEO Premium.
|
1338 |
+
*/
|
1339 |
+
|
1340 |
+
/**
|
1341 |
+
* Version of file yoast seo must be latest.
|
1342 |
+
*/
|
1343 |
+
/** @noinspection PhpInternalEntityUsedInspection */
|
1344 |
+
$src_version = version_compare( WPSEO_VERSION, '3.9', '>=' ) ? self::$version : $src_version;
|
1345 |
+
/** @noinspection PhpInternalEntityUsedInspection */
|
1346 |
+
$src_version_premium = version_compare( WPSEO_VERSION, '3.9', '>=' ) ? '39' : $src_version_premium;
|
1347 |
+
/**
|
1348 |
+
* @since WPGlobus 2.2.17
|
1349 |
+
*/
|
1350 |
+
$src_version_premium = version_compare( WPSEO_VERSION, '12.0', '>=' ) ? $src_version : $src_version_premium;
|
1351 |
+
|
1352 |
+
}
|
1353 |
+
|
1354 |
+
if ( $src_version ) :
|
1355 |
+
|
1356 |
+
$handle = self::$handle_script;
|
1357 |
+
|
1358 |
+
$src = WPGlobus::$PLUGIN_DIR_URL . 'includes/js/' .
|
1359 |
+
$handle . '-' . $src_version .
|
1360 |
+
WPGlobus::SCRIPT_SUFFIX() . '.js';
|
1361 |
+
|
1362 |
+
wp_register_script(
|
1363 |
+
$handle,
|
1364 |
+
$src,
|
1365 |
+
array( 'jquery', 'underscore' ),
|
1366 |
+
WPGLOBUS_VERSION,
|
1367 |
+
true
|
1368 |
+
);
|
1369 |
+
|
1370 |
+
wp_enqueue_script($handle);
|
1371 |
+
|
1372 |
+
wp_localize_script(
|
1373 |
+
$handle,
|
1374 |
+
'WPGlobusYoastSeo',
|
1375 |
+
array(
|
1376 |
+
'version' => WPGLOBUS_VERSION,
|
1377 |
+
'wpseo_version' => WPSEO_VERSION,
|
1378 |
+
'src_version' => $src_version,
|
1379 |
+
'builder_id' => WPGlobus::Config()->builder->get('id'),
|
1380 |
+
'builder_page' => WPGlobus::Config()->builder->is_builder_page() ? 'true' : 'false',
|
1381 |
+
'language' => WPGlobus::Config()->builder->get_language(),
|
1382 |
+
'is_default_language' => WPGlobus::Config()->builder->is_default_language() ? true : false,
|
1383 |
+
'src_version_premium' => $src_version_premium,
|
1384 |
+
'plus_module' => self::$plus_module,
|
1385 |
+
'access_extra' => ( defined( 'WPGLOBUS_YOAST_SEO_ACCESS_EXTRA' ) && WPGLOBUS_YOAST_SEO_ACCESS_EXTRA ) ? 'true' : 'false'
|
1386 |
+
)
|
1387 |
+
);
|
1388 |
+
|
1389 |
+
wp_localize_script(
|
1390 |
+
$handle,
|
1391 |
+
'WPGlobusVendor',
|
1392 |
+
array(
|
1393 |
+
'version' => WPGLOBUS_VERSION,
|
1394 |
+
'vendor' => WPGlobus::O()->vendors_scripts,
|
1395 |
+
'pagenow' => $pagenow,
|
1396 |
+
'i18n' => $i18n
|
1397 |
+
)
|
1398 |
+
);
|
1399 |
+
|
1400 |
+
endif;
|
1401 |
+
}
|
1402 |
+
}
|
1403 |
+
|
1404 |
+
/**
|
1405 |
+
* Check disabled entity.
|
1406 |
+
*
|
1407 |
+
* @since 1.7.3
|
1408 |
+
* @return boolean
|
1409 |
+
*/
|
1410 |
+
public static function disabled_entity() {
|
1411 |
+
|
1412 |
+
if ( WPGlobus_WP::is_pagenow( array( 'edit-tags.php', 'term.php' ) ) ) :
|
1413 |
+
/**
|
1414 |
+
* Don't check page when editing taxonomy.
|
1415 |
+
*/
|
1416 |
+
return false;
|
1417 |
+
endif;
|
1418 |
+
|
1419 |
+
/** @global WP_Post $post */
|
1420 |
+
global $post;
|
1421 |
+
|
1422 |
+
$result = false;
|
1423 |
+
if ( WPGlobus_WP::is_pagenow( array( 'post.php', 'post-new.php' ) ) ) :
|
1424 |
+
if ( empty( $post ) ) {
|
1425 |
+
$result = true;
|
1426 |
+
} elseif ( WPGlobus::O()->disabled_entity( $post->post_type ) ) {
|
1427 |
+
$result = true;
|
1428 |
+
}
|
1429 |
+
endif;
|
1430 |
+
return $result;
|
1431 |
+
}
|
1432 |
+
|
1433 |
+
/**
|
1434 |
+
* Filter allows changing graph breadcrumb output.
|
1435 |
+
*
|
1436 |
+
* @see wordpress-seo\src\generators\schema-generator.php
|
1437 |
+
* @see "application/ld+json" in html code on front.
|
1438 |
+
*
|
1439 |
+
* @since 2.4.7
|
1440 |
+
*
|
1441 |
+
* @scope front
|
1442 |
+
* @param array $graph_piece Array of graph piece.
|
1443 |
+
* @param Meta_Tags_Context $context A value object with context variables.
|
1444 |
+
* @return array
|
1445 |
+
*/
|
1446 |
+
public static function filter__wpseo_schema_breadcrumb( $graph_piece, $context ) {
|
1447 |
+
|
1448 |
+
if ( empty( $graph_piece['itemListElement'] ) ) {
|
1449 |
+
return $graph_piece;
|
1450 |
+
}
|
1451 |
+
|
1452 |
+
$itemListElement = $graph_piece['itemListElement'];
|
1453 |
+
|
1454 |
+
foreach( $itemListElement as $_key=>$_item ) {
|
1455 |
+
if ( ! empty( $_item['item']['name'] ) && WPGlobus_Core::has_translations( $_item['item']['name'] ) ) {
|
1456 |
+
$graph_piece['itemListElement'][$_key]['item']['name'] = WPGlobus_Core::extract_text( $graph_piece['itemListElement'][$_key]['item']['name'], WPGlobus::Config()->language );
|
1457 |
+
}
|
1458 |
+
}
|
1459 |
+
|
1460 |
+
return $graph_piece;
|
1461 |
+
}
|
1462 |
+
|
1463 |
+
/**
|
1464 |
+
* Filter allows changing output of graph `webpage`.
|
1465 |
+
*
|
1466 |
+
* @see wordpress-seo\src\generators\schema-generator.php
|
1467 |
+
* @see "application/ld+json" in html code on front.
|
1468 |
+
*
|
1469 |
+
* @since 2.4.14
|
1470 |
+
* @since 2.4.15 Localize description.
|
1471 |
+
* @since 2.5.1 Added support of taxonomies.
|
1472 |
+
*
|
1473 |
+
* @scope front
|
1474 |
+
* @param array $graph_piece Array of graph piece.
|
1475 |
+
* @param Meta_Tags_Context $context A value object with context variables.
|
1476 |
+
* @return array
|
1477 |
+
*/
|
1478 |
+
public static function filter__wpseo_schema_webpage( $graph_piece, $context ) {
|
1479 |
+
|
1480 |
+
if ( 'post' == $context->indexable->object_type ) {
|
1481 |
+
|
1482 |
+
if ( ! empty( $graph_piece['name'] ) && WPGlobus_Core::has_translations( $graph_piece['name'] ) ) {
|
1483 |
+
$graph_piece['name'] = WPGlobus_Core::extract_text( $graph_piece['name'], WPGlobus::Config()->language );
|
1484 |
+
}
|
1485 |
+
|
1486 |
+
/**
|
1487 |
+
* @since 2.4.15
|
1488 |
+
*/
|
1489 |
+
if ( ! empty( $graph_piece['description'] ) && WPGlobus_Core::has_translations( $graph_piece['description'] ) ) {
|
1490 |
+
$graph_piece['description'] = WPGlobus_Core::extract_text( $graph_piece['description'], WPGlobus::Config()->language );
|
1491 |
+
}
|
1492 |
+
|
1493 |
+
} elseif ( 'term' == $context->indexable->object_type ) {
|
1494 |
+
|
1495 |
+
/**
|
1496 |
+
* Taxonomy.
|
1497 |
+
* @since 2.5.1
|
1498 |
+
*/
|
1499 |
+
$graph_piece['description'] = self::get_taxonomy_meta( $context->indexable->object_sub_type, $context->indexable->object_id, 'wpseo_desc' );
|
1500 |
+
$graph_piece['url'] = WPGlobus_Utils::localize_url( $graph_piece['url'], WPGlobus::Config()->language );
|
1501 |
+
$graph_piece['@id'] = WPGlobus_Utils::localize_url( $graph_piece['@id'], WPGlobus::Config()->language );
|
1502 |
+
$graph_piece['breadcrumb']['@id'] = WPGlobus_Utils::localize_url( $graph_piece['breadcrumb']['@id'], WPGlobus::Config()->language );
|
1503 |
+
}
|
1504 |
+
|
1505 |
+
return $graph_piece;
|
1506 |
+
}
|
1507 |
+
|
1508 |
+
/**
|
1509 |
+
* Filter for changing the Yoast SEO generated title.
|
1510 |
+
*
|
1511 |
+
* @see wordpress-seo\src\presenters\title-presenter.php
|
1512 |
+
*
|
1513 |
+
* @since 2.5.22
|
1514 |
+
*
|
1515 |
+
* @scope front
|
1516 |
+
*
|
1517 |
+
* @param string $title The title.
|
1518 |
+
* @param Indexable_Presentation $presentation The presentation of an indexable.
|
1519 |
+
*
|
1520 |
+
* @return string
|
1521 |
+
*/
|
1522 |
+
public static function filter_front__title( $title, $presentation ) {
|
1523 |
+
|
1524 |
+
if ( 'post' == $presentation->model->object_type ) {
|
1525 |
+
|
1526 |
+
/**
|
1527 |
+
* Post.
|
1528 |
+
*/
|
1529 |
+
$meta_cache = wp_cache_get( $presentation->model->object_id, 'post_meta' );
|
1530 |
+
|
1531 |
+
if ( ! empty( $meta_cache['_yoast_wpseo_title'][0] ) ) {
|
1532 |
+
|
1533 |
+
$__title = WPGlobus_Core::text_filter( $meta_cache['_yoast_wpseo_title'][0], WPGlobus::Config()->language );
|
1534 |
+
|
1535 |
+
if ( $presentation->source instanceof WP_Post ) {
|
1536 |
+
|
1537 |
+
if ( WPGlobus_Core::has_translations( $presentation->source->post_title ) ) {
|
1538 |
+
$presentation->source->post_title = WPGlobus_Core::text_filter( $presentation->source->post_title, WPGlobus::Config()->language );
|
1539 |
+
}
|
1540 |
+
|
1541 |
+
/**
|
1542 |
+
* @see wordpress-seo\inc\wpseo-functions.php
|
1543 |
+
*/
|
1544 |
+
$title = wpseo_replace_vars( $__title, $presentation->source );
|
1545 |
+
}
|
1546 |
+
|
1547 |
+
} else {
|
1548 |
+
|
1549 |
+
/**
|
1550 |
+
* @since 2.5.23
|
1551 |
+
*/
|
1552 |
+
if ( WPGlobus_Core::has_translations( $title ) ) {
|
1553 |
+
$title = WPGlobus_Core::extract_text( $title, WPGlobus::Config()->language );
|
1554 |
+
}
|
1555 |
+
|
1556 |
+
}
|
1557 |
+
|
1558 |
+
} elseif ( 'term' == $presentation->model->object_type ) {
|
1559 |
+
|
1560 |
+
/**
|
1561 |
+
* Taxonomy.
|
1562 |
+
*/
|
1563 |
+
$__title = self::get_taxonomy_meta( $presentation->model->object_sub_type, $presentation->model->object_id, 'wpseo_title' );
|
1564 |
+
|
1565 |
+
if ( empty( $__title ) ) {
|
1566 |
+
$__title = self::get_option( 'wpseo_titles', 'title-tax-' . $presentation->model->object_sub_type );
|
1567 |
+
}
|
1568 |
+
|
1569 |
+
$title = wpseo_replace_vars( $__title, $presentation->source );
|
1570 |
+
|
1571 |
+
}
|
1572 |
+
|
1573 |
+
return $title;
|
1574 |
+
}
|
1575 |
+
|
1576 |
+
/**
|
1577 |
+
* Get wpseo options.
|
1578 |
+
*
|
1579 |
+
* @since 2.5.22
|
1580 |
+
*
|
1581 |
+
* @return array|string
|
1582 |
+
*/
|
1583 |
+
public static function get_option( $option = 'wpseo_titles', $key = '' ) {
|
1584 |
+
|
1585 |
+
/**
|
1586 |
+
* @todo Maybe to use WPSEO_Options.
|
1587 |
+
* @see wordpress-seo\inc\options\class-wpseo-options.php
|
1588 |
+
* @since 2.5.22
|
1589 |
+
*/
|
1590 |
+
|
1591 |
+
$options = get_option( $option );
|
1592 |
+
|
1593 |
+
if ( empty( $key ) ) {
|
1594 |
+
return $options;
|
1595 |
+
}
|
1596 |
+
|
1597 |
+
if ( ! isset( $options[$key] ) ) {
|
1598 |
+
return null;
|
1599 |
+
}
|
1600 |
+
|
1601 |
+
return $options[$key];
|
1602 |
+
}
|
1603 |
+
|
1604 |
+
} // class WPGlobus_YoastSEO.
|
1605 |
+
|
1606 |
# --- EOF
|
languages/wpglobus.pot
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
# Copyright (C) 2021 WPGlobus 2.6.
|
2 |
-
# This file is distributed under the same license as the WPGlobus 2.6.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WPGlobus 2.6.
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
1 |
+
# Copyright (C) 2021 WPGlobus 2.6.3
|
2 |
+
# This file is distributed under the same license as the WPGlobus 2.6.3 package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WPGlobus 2.6.3\n"
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
readme.txt
CHANGED
@@ -217,6 +217,10 @@ WPGlobus Version 2 supports WordPress 5.x, with Gutenberg.
|
|
217 |
|
218 |
== Changelog ==
|
219 |
|
|
|
|
|
|
|
|
|
220 |
= 2.6.2 =
|
221 |
* (Core) Added `wpglobus_show_title_fields` filter.
|
222 |
* (Core/Post Types) Added the `Ultimate Member` plugin post types to the `"hidden types"` list.
|
217 |
|
218 |
== Changelog ==
|
219 |
|
220 |
+
= 2.6.3 =
|
221 |
+
* (Vendor/Yoast) Fixed issue with empty Open Graph description.
|
222 |
+
* (Updater) Missing assets in the ZIP file.
|
223 |
+
|
224 |
= 2.6.2 =
|
225 |
* (Core) Added `wpglobus_show_title_fields` filter.
|
226 |
* (Core/Post Types) Added the `Ultimate Member` plugin post types to the `"hidden types"` list.
|
vendor/tivwp/updater/assets/css/fix-info-sections.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#section-holder .section h2 {
|
2 |
+
clear: none;
|
3 |
+
}
|
4 |
+
|
5 |
+
#section-holder .section img {
|
6 |
+
max-width: 100%
|
7 |
+
}
|
vendor/tivwp/updater/assets/css/tivwp-updater.css
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.tivwp-updater-status-value {
|
2 |
+
font-weight: 700;
|
3 |
+
}
|
4 |
+
|
5 |
+
.tivwp-updater-status-inactive .tivwp-updater-status-value {
|
6 |
+
color: #cc0000;
|
7 |
+
background-color: #ffffff;
|
8 |
+
}
|
9 |
+
|
10 |
+
.tivwp-updater-instance,
|
11 |
+
.tivwp-updater-notifications {
|
12 |
+
opacity: .6;
|
13 |
+
}
|
14 |
+
|
15 |
+
input[id$='_licence_key'] {
|
16 |
+
min-width: 23em;
|
17 |
+
font-family: monospace;
|
18 |
+
}
|
vendor/tivwp/updater/assets/js/tivwp-updater.js
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(function ($) {
|
2 |
+
$('.tivwp-updater-action-button').on("click", function () {
|
3 |
+
// noinspection ES6ConvertVarToLetConst
|
4 |
+
var dataPlugin = $(this).data('tivwp-updater-plugin');
|
5 |
+
$(this).css({cursor: "wait", opacity: ".3"});
|
6 |
+
$('input[type="checkbox"]').prop("checked", false);
|
7 |
+
$('tr[data-plugin="' + dataPlugin + '"]').find('input[type="checkbox"]').prop("checked", true);
|
8 |
+
})
|
9 |
+
});
|
wpglobus.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* Description: A WordPress Globalization / Multilingual Plugin. Posts, pages, menus, widgets and even custom fields - in multiple languages!
|
16 |
* Text Domain: wpglobus
|
17 |
* Domain Path: /languages/
|
18 |
-
* Version: 2.6.
|
19 |
* Author: WPGlobus
|
20 |
* Author URI: https://wpglobus.com/
|
21 |
* Network: false
|
@@ -44,7 +44,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
44 |
exit;
|
45 |
}
|
46 |
|
47 |
-
define( 'WPGLOBUS_VERSION', '2.6.
|
48 |
define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
49 |
define( 'WPGLOBUS_AJAX', 'wpglobus-ajax' );
|
50 |
|
15 |
* Description: A WordPress Globalization / Multilingual Plugin. Posts, pages, menus, widgets and even custom fields - in multiple languages!
|
16 |
* Text Domain: wpglobus
|
17 |
* Domain Path: /languages/
|
18 |
+
* Version: 2.6.3
|
19 |
* Author: WPGlobus
|
20 |
* Author URI: https://wpglobus.com/
|
21 |
* Network: false
|
44 |
exit;
|
45 |
}
|
46 |
|
47 |
+
define( 'WPGLOBUS_VERSION', '2.6.3' );
|
48 |
define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
49 |
define( 'WPGLOBUS_AJAX', 'wpglobus-ajax' );
|
50 |
|