Version Description
Download this release
Release Info
Developer | DannyCooper |
Plugin | Google Fonts for WordPress |
Version | 2.0.7 |
Comparing to | |
See all releases |
Code changes from version 2.0.6 to 2.0.7
- changelog.txt +4 -0
- includes/gutenberg/output-css.php +22 -9
- olympus-google-fonts.php +2 -2
- readme.txt +1 -1
changelog.txt
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
= 2.0.6 =
|
2 |
|
3 |
* Output the 'Basic Setting' choices as CSS variables. props @helgatheviking
|
1 |
+
= 2.0.7 =
|
2 |
+
|
3 |
+
* Fix array_key_exists() error, props @rafafallo
|
4 |
+
|
5 |
= 2.0.6 =
|
6 |
|
7 |
* Output the 'Basic Setting' choices as CSS variables. props @helgatheviking
|
includes/gutenberg/output-css.php
CHANGED
@@ -181,20 +181,33 @@ function ogf_generate_css_gutenberg( $selector, $option_name ) {
|
|
181 |
*/
|
182 |
function ogf_generate_css_variables() {
|
183 |
|
184 |
-
|
185 |
-
$
|
186 |
-
$
|
187 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
|
189 |
$css =
|
190 |
'
|
191 |
:root {
|
192 |
-
--font-body: ' . esc_attr( $
|
193 |
-
--font-heading: ' . esc_attr( $
|
194 |
-
--font-input: ' . esc_attr( $
|
195 |
}
|
196 |
';
|
197 |
|
198 |
-
return
|
199 |
|
200 |
-
}
|
181 |
*/
|
182 |
function ogf_generate_css_variables() {
|
183 |
|
184 |
+
$body_font = get_theme_mod( 'ogf_body_font', false );
|
185 |
+
$headings_font = get_theme_mod( 'ogf_headings_font', false );
|
186 |
+
$inputs_font = get_theme_mod( 'ogf_inputs_font', false );
|
187 |
+
|
188 |
+
$body_font_stack = '';
|
189 |
+
$headings_font_stack = '';
|
190 |
+
$inputs_font_stack = '';
|
191 |
+
|
192 |
+
if ( $body_font ) {
|
193 |
+
$body_font_stack = str_replace( '"', '', ogf_build_font_stack( $body_font ) );
|
194 |
+
}
|
195 |
+
if ( $headings_font ) {
|
196 |
+
$headings_font_stack = str_replace( '"', '', ogf_build_font_stack( $headings_font ) );
|
197 |
+
}
|
198 |
+
if ( $inputs_font ) {
|
199 |
+
$inputs_font_stack = str_replace( '"', '', ogf_build_font_stack( $inputs_font ) );
|
200 |
+
}
|
201 |
|
202 |
$css =
|
203 |
'
|
204 |
:root {
|
205 |
+
--font-body: ' . esc_attr( $body_font_stack ) . ';
|
206 |
+
--font-heading: ' . esc_attr( $headings_font_stack ) . ';
|
207 |
+
--font-input: ' . esc_attr( $inputs_font_stack ) . ';
|
208 |
}
|
209 |
';
|
210 |
|
211 |
+
return $css;
|
212 |
|
213 |
+
}
|
olympus-google-fonts.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Plugin Name: Google Fonts Typography
|
6 |
* Plugin URI: https://wordpress.org/plugins/olympus-google-fonts/
|
7 |
* Description: The easiest to use Google Fonts typography plugin. No coding required. 900+ font choices.
|
8 |
-
* Version: 2.0.
|
9 |
* Author: Fonts Plugin
|
10 |
* Author URI: https://fontsplugin.com/?utm_source=wporg&utm_campaign=heading
|
11 |
* Text Domain: olympus-google-fonts
|
@@ -18,7 +18,7 @@
|
|
18 |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
19 |
*/
|
20 |
|
21 |
-
define( 'OGF_VERSION', '2.0.
|
22 |
define( 'OGF_DIR_PATH', plugin_dir_path( __FILE__ ) );
|
23 |
define( 'OGF_DIR_URL', plugin_dir_url( __FILE__ ) );
|
24 |
|
5 |
* Plugin Name: Google Fonts Typography
|
6 |
* Plugin URI: https://wordpress.org/plugins/olympus-google-fonts/
|
7 |
* Description: The easiest to use Google Fonts typography plugin. No coding required. 900+ font choices.
|
8 |
+
* Version: 2.0.7
|
9 |
* Author: Fonts Plugin
|
10 |
* Author URI: https://fontsplugin.com/?utm_source=wporg&utm_campaign=heading
|
11 |
* Text Domain: olympus-google-fonts
|
18 |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
19 |
*/
|
20 |
|
21 |
+
define( 'OGF_VERSION', '2.0.7' );
|
22 |
define( 'OGF_DIR_PATH', plugin_dir_path( __FILE__ ) );
|
23 |
define( 'OGF_DIR_URL', plugin_dir_url( __FILE__ ) );
|
24 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: https://fontsplugin.com/#pricing
|
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.4
|
7 |
License: GPLv2 or later
|
8 |
-
Stable tag: 2.0.
|
9 |
|
10 |
The easiest to use Google Fonts Typography Plugin. No coding required. 900+ font choices.
|
11 |
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.4
|
7 |
License: GPLv2 or later
|
8 |
+
Stable tag: 2.0.7
|
9 |
|
10 |
The easiest to use Google Fonts Typography Plugin. No coding required. 900+ font choices.
|
11 |
|