Google Fonts for WordPress - Version 3.0.16

Version Description

Download this release

Release Info

Developer DannyCooper
Plugin Icon 128x128 Google Fonts for WordPress
Version 3.0.16
Comparing to
See all releases

Code changes from version 3.0.15 to 3.0.16

assets/css/customize-controls.css CHANGED
@@ -48,6 +48,7 @@
48
  width: 90%;
49
  }
50
 
 
51
  .customize-control-typography li.typography-text-transform select {
52
  width: 93%;
53
  }
48
  width: 90%;
49
  }
50
 
51
+ .customize-control-typography li.typography-text-decoration select,
52
  .customize-control-typography li.typography-text-transform select {
53
  width: 93%;
54
  }
assets/js/customize-preview.js CHANGED
@@ -155,6 +155,19 @@ jQuery( document ).ready(
155
  }
156
  );
157
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  wp.customize(
159
  id + '_letter_spacing',
160
  function( value ) {
155
  }
156
  );
157
 
158
+ wp.customize(
159
+ id + '_text_decoration',
160
+ function( value ) {
161
+ value.bind(
162
+ function( to ) {
163
+ jQuery( val.selectors ).each( function( i, v ) {
164
+ v.style.setProperty( 'text-decoration', to, 'important' );
165
+ } );
166
+ }
167
+ );
168
+ }
169
+ );
170
+
171
  wp.customize(
172
  id + '_letter_spacing',
173
  function( value ) {
changelog.txt CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  = 3.0.15 =
2
 
3
  * Fix issue with translations in /languages loading too late.
1
+ = 3.0.16 =
2
+
3
+ * Fix footer heading selectors.
4
+
5
  = 3.0.15 =
6
 
7
  * Fix issue with translations in /languages loading too late.
class-olympus-google-fonts.php CHANGED
@@ -39,7 +39,7 @@ class Olympus_Google_Fonts {
39
  */
40
  public function constants() {
41
  if ( ! defined( 'OGF_VERSION' ) ) {
42
- define( 'OGF_VERSION', '3.0.15' );
43
  }
44
 
45
  if ( ! defined( 'OGF_DIR_PATH' ) ) {
39
  */
40
  public function constants() {
41
  if ( ! defined( 'OGF_VERSION' ) ) {
42
+ define( 'OGF_VERSION', '3.0.16' );
43
  }
44
 
45
  if ( ! defined( 'OGF_DIR_PATH' ) ) {
includes/customizer/output-css.php CHANGED
@@ -92,6 +92,7 @@ function ogf_generate_css( $selector, $option_name ) {
92
  $color = get_theme_mod( $option_name . '_font_color', false );
93
  $text_transform = get_theme_mod( $option_name . '_text_transform', false );
94
  $letter_spacing = get_theme_mod( $option_name . '_letter_spacing', false );
 
95
 
96
  $return = '';
97
 
@@ -100,7 +101,7 @@ function ogf_generate_css( $selector, $option_name ) {
100
  ( $weight !== '0' && $weight ) ||
101
  ( $style !== 'default' && $style ) ||
102
  $font_size || $letter_spacing || $text_transform ||
103
- $color ) {
104
 
105
  $return .= $selector . ' {' . PHP_EOL;
106
 
@@ -173,6 +174,14 @@ function ogf_generate_css( $selector, $option_name ) {
173
  );
174
  }
175
 
 
 
 
 
 
 
 
 
176
  $return .= ' }' . PHP_EOL;
177
 
178
  echo wp_kses_post( $return );
92
  $color = get_theme_mod( $option_name . '_font_color', false );
93
  $text_transform = get_theme_mod( $option_name . '_text_transform', false );
94
  $letter_spacing = get_theme_mod( $option_name . '_letter_spacing', false );
95
+ $text_decoration = get_theme_mod( $option_name . '_text_decoration', false );
96
 
97
  $return = '';
98
 
101
  ( $weight !== '0' && $weight ) ||
102
  ( $style !== 'default' && $style ) ||
103
  $font_size || $letter_spacing || $text_transform ||
104
+ $color || $text_decoration ) {
105
 
106
  $return .= $selector . ' {' . PHP_EOL;
107
 
174
  );
175
  }
176
 
177
+ // Return text-decoration CSS.
178
+ if ( $text_decoration ) {
179
+ $return .= sprintf(
180
+ 'text-decoration: %s;' . PHP_EOL,
181
+ esc_attr( $text_decoration ) . ogf_is_forced()
182
+ );
183
+ }
184
+
185
  $return .= ' }' . PHP_EOL;
186
 
187
  echo wp_kses_post( $return );
includes/customizer/settings.php CHANGED
@@ -163,6 +163,13 @@ function ogf_customize_register( $wp_customize ) {
163
  )
164
  );
165
 
 
 
 
 
 
 
 
166
  $wp_customize->add_control(
167
  new OGF_Customize_Typography_Control(
168
  $wp_customize,
@@ -172,19 +179,24 @@ function ogf_customize_register( $wp_customize ) {
172
  'label' => ( isset( $values['label'] ) ? esc_attr( $values['label'] ) : '' ),
173
  'description' => ( isset( $values['description'] ) ? esc_attr( $values['description'] ) : '' ),
174
  'section' => ( isset( $values['section'] ) ? esc_attr( $values['section'] ) : '' ),
175
- 'settings' => array(
176
- 'family' => $id . '_font',
177
- 'weight' => $id . '_font_weight',
178
- 'style' => $id . '_font_style',
179
- 'size' => $id . '_font_size',
180
- 'size_tablet' => $id . '_font_size_tablet',
181
- 'size_mobile' => $id . '_font_size_mobile',
182
- 'line_height' => $id . '_line_height',
183
- 'line_height_tablet' => $id . '_line_height_tablet',
184
- 'line_height_mobile' => $id . '_line_height_mobile',
185
- 'color' => $id . '_font_color',
186
- 'letter_spacing' => $id . '_letter_spacing',
187
- 'text_transform' => $id . '_text_transform',
 
 
 
 
 
188
  ),
189
  )
190
  )
163
  )
164
  );
165
 
166
+ $wp_customize->add_setting(
167
+ $id . '_text_decoration',
168
+ array(
169
+ 'transport' => 'postMessage',
170
+ )
171
+ );
172
+
173
  $wp_customize->add_control(
174
  new OGF_Customize_Typography_Control(
175
  $wp_customize,
179
  'label' => ( isset( $values['label'] ) ? esc_attr( $values['label'] ) : '' ),
180
  'description' => ( isset( $values['description'] ) ? esc_attr( $values['description'] ) : '' ),
181
  'section' => ( isset( $values['section'] ) ? esc_attr( $values['section'] ) : '' ),
182
+ 'settings' =>
183
+ apply_filters(
184
+ 'ogf_typography_control_settings',
185
+ array(
186
+ 'family' => $id . '_font',
187
+ 'weight' => $id . '_font_weight',
188
+ 'style' => $id . '_font_style',
189
+ 'size' => $id . '_font_size',
190
+ 'size_tablet' => $id . '_font_size_tablet',
191
+ 'size_mobile' => $id . '_font_size_mobile',
192
+ 'line_height' => $id . '_line_height',
193
+ 'line_height_tablet' => $id . '_line_height_tablet',
194
+ 'line_height_mobile' => $id . '_line_height_mobile',
195
+ 'color' => $id . '_font_color',
196
+ 'letter_spacing' => $id . '_letter_spacing',
197
+ 'text_transform' => $id . '_text_transform',
198
+ ),
199
+ $id
200
  ),
201
  )
202
  )
includes/functions.php CHANGED
@@ -135,9 +135,7 @@ function ogf_get_elements() {
135
  'label' => esc_html__( 'Headings Typography', 'olympus-google-fonts' ),
136
  'description' => esc_html__( 'Select and configure the font for your footer headings.', 'olympus-google-fonts' ),
137
  'section' => 'ogf_advanced__footer',
138
- 'selectors' => 'footer h1, footer h2, footer h3, footer h4, footer h5, footer h6,
139
- .footer h1, .footer h2, .footer h3, .footer h4, .footer h5, .footer h6
140
- #footer h1, #footer h2, #footer h3, #footer h4, #footer h5, #footer h6',
141
  ),
142
  'ogf_footer_content' => array(
143
  'label' => esc_html__( 'Content Typography', 'olympus-google-fonts' ),
135
  'label' => esc_html__( 'Headings Typography', 'olympus-google-fonts' ),
136
  'description' => esc_html__( 'Select and configure the font for your footer headings.', 'olympus-google-fonts' ),
137
  'section' => 'ogf_advanced__footer',
138
+ 'selectors' => 'footer h1, footer h2, footer h3, footer h4, footer h5, footer h6, .footer h1, .footer h2, .footer h3, .footer h4, .footer h5, .footer h6, #footer h1, #footer h2, #footer h3, #footer h4, #footer h5, #footer h6',
 
 
139
  ),
140
  'ogf_footer_content' => array(
141
  'label' => esc_html__( 'Content Typography', 'olympus-google-fonts' ),
olympus-google-fonts.php CHANGED
@@ -5,7 +5,7 @@
5
  * Plugin Name: Fonts Plugin | Google Fonts Typography
6
  * Plugin URI: https://wordpress.org/plugins/olympus-google-fonts/
7
  * Description: The easiest to use Google Fonts Plugin. No coding required. Optimized for Speed. 1000+ font choices.
8
- * Version: 3.0.15
9
  * Author: Fonts Plugin
10
  * Author URI: https://fontsplugin.com/?utm_source=wporg&utm_medium=readme&utm_campaign=description
11
  * Text Domain: olympus-google-fonts
5
  * Plugin Name: Fonts Plugin | Google Fonts Typography
6
  * Plugin URI: https://wordpress.org/plugins/olympus-google-fonts/
7
  * Description: The easiest to use Google Fonts Plugin. No coding required. Optimized for Speed. 1000+ font choices.
8
+ * Version: 3.0.16
9
  * Author: Fonts Plugin
10
  * Author URI: https://fontsplugin.com/?utm_source=wporg&utm_medium=readme&utm_campaign=description
11
  * Text Domain: olympus-google-fonts
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://fontsplugin.com/#pricing
5
  Requires at least: 4.0
6
  Tested up to: 5.9
7
  License: GPLv2 or later
8
- Stable tag: 3.0.15
9
 
10
  The easiest to use Google Fonts Plugin. No coding required. Optimized for Speed. 1000+ font choices.
11
 
5
  Requires at least: 4.0
6
  Tested up to: 5.9
7
  License: GPLv2 or later
8
+ Stable tag: 3.0.16
9
 
10
  The easiest to use Google Fonts Plugin. No coding required. Optimized for Speed. 1000+ font choices.
11