Version Description
Jun.16 2019, dev time: 30m
- Fix: Google Fonts URL references in multisites.
- New: It is now possible to reset Kirki google-font caches by visiting {site-url}/?action=kirki-reset-cache
See the previous changelogs here.
Download this release
Release Info
| Developer | aristath |
| Plugin | |
| Version | 3.0.43 |
| Comparing to | |
| See all releases | |
Code changes from version 3.0.42 to 3.0.43
- CHANGELOG.md +7 -0
- kirki.php +2 -2
- modules/webfonts/class-kirki-fonts.php +7 -2
- modules/webfonts/class-kirki-modules-webfonts-embed.php +6 -3
- readme.txt +5 -6
CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
## 3.0.42
|
| 2 |
|
| 3 |
Jun.16 2019, dev time: 2h
|
| 1 |
+
## 3.0.43
|
| 2 |
+
|
| 3 |
+
Jun.16 2019, dev time: 30m
|
| 4 |
+
|
| 5 |
+
* Fix: Google Fonts URL references in multisites.
|
| 6 |
+
* New: It is now possible to reset Kirki google-font caches by visiting {site-url}/?action=kirki-reset-cache
|
| 7 |
+
|
| 8 |
## 3.0.42
|
| 9 |
|
| 10 |
Jun.16 2019, dev time: 2h
|
kirki.php
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
* Description: The Ultimate WordPress Customizer Framework
|
| 6 |
* Author: Ari Stathopoulos (@aristath)
|
| 7 |
* Author URI: https://aristath.github.io
|
| 8 |
-
* Version: 3.0.
|
| 9 |
* Text Domain: kirki
|
| 10 |
* Requires WP: 4.9
|
| 11 |
* Requires PHP: 5.3
|
|
@@ -40,7 +40,7 @@ if ( ! defined( 'KIRKI_PLUGIN_FILE' ) ) {
|
|
| 40 |
|
| 41 |
// Define the KIRKI_VERSION constant.
|
| 42 |
if ( ! defined( 'KIRKI_VERSION' ) ) {
|
| 43 |
-
define( 'KIRKI_VERSION', '3.0.
|
| 44 |
}
|
| 45 |
|
| 46 |
// Make sure the path is properly set.
|
| 5 |
* Description: The Ultimate WordPress Customizer Framework
|
| 6 |
* Author: Ari Stathopoulos (@aristath)
|
| 7 |
* Author URI: https://aristath.github.io
|
| 8 |
+
* Version: 3.0.43
|
| 9 |
* Text Domain: kirki
|
| 10 |
* Requires WP: 4.9
|
| 11 |
* Requires PHP: 5.3
|
| 40 |
|
| 41 |
// Define the KIRKI_VERSION constant.
|
| 42 |
if ( ! defined( 'KIRKI_VERSION' ) ) {
|
| 43 |
+
define( 'KIRKI_VERSION', '3.0.43' );
|
| 44 |
}
|
| 45 |
|
| 46 |
// Make sure the path is properly set.
|
modules/webfonts/class-kirki-fonts.php
CHANGED
|
@@ -122,8 +122,13 @@ final class Kirki_Fonts {
|
|
| 122 |
// Get fonts from cache.
|
| 123 |
self::$google_fonts = get_site_transient( 'kirki_googlefonts_cache' );
|
| 124 |
|
| 125 |
-
|
| 126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
self::$google_fonts = false;
|
| 128 |
}
|
| 129 |
|
| 122 |
// Get fonts from cache.
|
| 123 |
self::$google_fonts = get_site_transient( 'kirki_googlefonts_cache' );
|
| 124 |
|
| 125 |
+
/**
|
| 126 |
+
* Reset the cache if we're debugging, or if we force-reset caches using action=kirki-reset-cache in the URL.
|
| 127 |
+
*
|
| 128 |
+
* Note to code reviewers:
|
| 129 |
+
* There's no need to check nonces or anything else, this is a simple true/false evaluation.
|
| 130 |
+
*/
|
| 131 |
+
if ( ( defined( 'WP_DEBUG' ) && WP_DEBUG ) || ( ! empty( $_GET['action'] ) && 'kirki-reset-cache' === $_GET['action'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
|
| 132 |
self::$google_fonts = false;
|
| 133 |
}
|
| 134 |
|
modules/webfonts/class-kirki-modules-webfonts-embed.php
CHANGED
|
@@ -146,12 +146,15 @@ final class Kirki_Modules_Webfonts_Embed {
|
|
| 146 |
$url = "https://fonts.googleapis.com/css?family={$family}:{$weights}&subset=cyrillic,cyrillic-ext,devanagari,greek,greek-ext,khmer,latin,latin-ext,vietnamese,hebrew,arabic,bengali,gujarati,tamil,telugu,thai";
|
| 147 |
|
| 148 |
$transient_id = 'kirki_gfonts_' . md5( $url );
|
| 149 |
-
$contents =
|
|
|
|
| 150 |
/**
|
|
|
|
|
|
|
| 151 |
* Note to code reviewers:
|
| 152 |
* There's no need to check nonces or anything else, this is a simple true/false evaluation.
|
| 153 |
*/
|
| 154 |
-
if ( ! empty( $_GET['action'] ) && 'kirki-reset-cache' === $_GET['action'] ) { // phpcs:ignore WordPress.Security.NonceVerification
|
| 155 |
$contents = false;
|
| 156 |
}
|
| 157 |
if ( ! $contents ) {
|
|
@@ -201,7 +204,7 @@ final class Kirki_Modules_Webfonts_Embed {
|
|
| 201 |
);
|
| 202 |
|
| 203 |
// Set the transient for a day.
|
| 204 |
-
|
| 205 |
}
|
| 206 |
}
|
| 207 |
if ( $contents ) {
|
| 146 |
$url = "https://fonts.googleapis.com/css?family={$family}:{$weights}&subset=cyrillic,cyrillic-ext,devanagari,greek,greek-ext,khmer,latin,latin-ext,vietnamese,hebrew,arabic,bengali,gujarati,tamil,telugu,thai";
|
| 147 |
|
| 148 |
$transient_id = 'kirki_gfonts_' . md5( $url );
|
| 149 |
+
$contents = get_transient( $transient_id );
|
| 150 |
+
|
| 151 |
/**
|
| 152 |
+
* Reset the cache if we're debugging, or if we force-reset caches using action=kirki-reset-cache in the URL.
|
| 153 |
+
*
|
| 154 |
* Note to code reviewers:
|
| 155 |
* There's no need to check nonces or anything else, this is a simple true/false evaluation.
|
| 156 |
*/
|
| 157 |
+
if ( ( defined( 'WP_DEBUG' ) && WP_DEBUG ) || ( ! empty( $_GET['action'] ) && 'kirki-reset-cache' === $_GET['action'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
|
| 158 |
$contents = false;
|
| 159 |
}
|
| 160 |
if ( ! $contents ) {
|
| 204 |
);
|
| 205 |
|
| 206 |
// Set the transient for a day.
|
| 207 |
+
set_transient( $transient_id, $contents, DAY_IN_SECONDS );
|
| 208 |
}
|
| 209 |
}
|
| 210 |
if ( $contents ) {
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Tags: customizer, options framework, theme, mods, toolkit, gutenberg
|
|
| 4 |
Donate link: https://aristath.github.io/donate
|
| 5 |
Requires at least: 4.9
|
| 6 |
Tested up to: 5.2
|
| 7 |
-
Stable tag: 3.0.
|
| 8 |
License: MIT
|
| 9 |
License URI: https://opensource.org/licenses/MIT
|
| 10 |
|
|
@@ -73,12 +73,11 @@ If you want to integrate Kirki in your theme or plugin, please read the instruct
|
|
| 73 |
|
| 74 |
== Changelog ==
|
| 75 |
|
| 76 |
-
= 3.0.
|
| 77 |
|
| 78 |
-
Jun.16 2019, dev time:
|
| 79 |
|
| 80 |
-
*
|
| 81 |
-
*
|
| 82 |
-
* Fix: Updated Google Fonts list.
|
| 83 |
|
| 84 |
[See the previous changelogs here](https://github.com/aristath/kirki/blob/master/CHANGELOG.md).
|
| 4 |
Donate link: https://aristath.github.io/donate
|
| 5 |
Requires at least: 4.9
|
| 6 |
Tested up to: 5.2
|
| 7 |
+
Stable tag: 3.0.43
|
| 8 |
License: MIT
|
| 9 |
License URI: https://opensource.org/licenses/MIT
|
| 10 |
|
| 73 |
|
| 74 |
== Changelog ==
|
| 75 |
|
| 76 |
+
= 3.0.43 =
|
| 77 |
|
| 78 |
+
Jun.16 2019, dev time: 30m
|
| 79 |
|
| 80 |
+
* Fix: Google Fonts URL references in multisites.
|
| 81 |
+
* New: It is now possible to reset Kirki google-font caches by visiting {site-url}/?action=kirki-reset-cache
|
|
|
|
| 82 |
|
| 83 |
[See the previous changelogs here](https://github.com/aristath/kirki/blob/master/CHANGELOG.md).
|
