Google Fonts for WordPress - Version 2.0.3

Version Description

Download this release

Release Info

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

Code changes from version 2.0.2 to 2.0.3

changelog.txt CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  = 2.0.2 =
2
 
3
  * Remove incorrectly printed variable in customizer.
1
+ = 2.0.3 =
2
+
3
+ * Hotfix for customizer weight selector control.
4
+
5
  = 2.0.2 =
6
 
7
  * Remove incorrectly printed variable in customizer.
includes/customizer/controls/class-ogf-customize-typography-control.php CHANGED
@@ -109,30 +109,24 @@ class OGF_Customize_Typography_Control extends WP_Customize_Control {
109
  <# } #>
110
 
111
  <select class="ogf-select" {{{ data.family.link }}}>
112
-
113
- <option value="default"><?php esc_html_e( 'Default Font', 'olympus-google-fonts' ); ?></option>
114
-
115
  <# if ( typeof ogf_custom_fonts !== "undefined" ) { #>
116
-
117
  <option disabled><?php esc_html_e( '- Custom Fonts -', 'olympus-google-fonts' ); ?></option>
118
  <# _.each( ogf_custom_fonts, function( font_data, font_id ) { #>
119
  <option value="cf-{{ font_id }}" <# if ( font_id === data.family.value ) { #> selected="selected" <# } #>>{{ font_data.label }}</option>
120
  <# } ) #>
121
  <# } #>
122
-
123
  <option disabled><?php esc_html_e( '- System Fonts -', 'olympus-google-fonts' ); ?></option>
124
  <# _.each( ogf_system_fonts, function( font_data, font_id ) { #>
125
  <option value="sf-{{ font_id }}" <# if ( font_id === data.family.value ) { #> selected="selected" <# } #>>{{ font_data.label }}</option>
126
  <# } ) #>
127
-
128
  <option disabled><?php esc_html_e( '- Google Fonts -', 'olympus-google-fonts' ); ?></option>
129
-
130
  <# _.each( ogf_font_array, function( font_data, font_id ) { #>
131
  <option value="{{ font_id }}" <# if ( font_id === data.family.value ) { #> selected="selected" <# } #>>{{ font_data.family }}</option>
132
  <# } ) #>
133
-
134
  </select>
135
-
136
  <button type="button" class="advanced-button">
137
  <span class="screen-reader-text"><?php esc_html_e( 'Advanced', 'olympus-google-fonts' ); ?></span>
138
  </button>
@@ -141,67 +135,48 @@ class OGF_Customize_Typography_Control extends WP_Customize_Control {
141
 
142
 
143
  <div class="advanced-settings-wrapper">
144
-
145
  <# if ( data.weight && data.weight.choices ) { #>
146
  <li class="typography-font-weight">
147
-
148
  <# if ( data.weight.label ) { #>
149
  <span class="customize-control-title">{{ data.weight.label }}</span>
150
  <# } #>
151
  <select {{{ data.weight.link }}}>
152
-
153
  <# _.each( data.weight.choices, function( label, choice ) { #>
154
-
155
  <option value="{{ choice }}" <# if ( choice === data.weight.value ) { #> selected="selected" <# } #>>{{ label }}</option>
156
-
157
  <# } ) #>
158
-
159
  </select>
160
  </li>
161
  <# } #>
162
 
163
  <# if ( data.style && data.style.choices ) { #>
164
  <li class="typography-font-style">
165
-
166
  <# if ( data.style.label ) { #>
167
  <span class="customize-control-title">{{ data.style.label }}</span>
168
  <# } #>
169
-
170
  <select {{{ data.style.link }}}>
171
-
172
  <# _.each( data.style.choices, function( label, choice ) { #>
173
-
174
  <option value="{{ choice }}" <# if ( choice === data.style.value ) { #> selected="selected" <# } #>>{{ label }}</option>
175
-
176
  <# } ) #>
177
-
178
  </select>
179
  </li>
180
  <# } #>
181
 
182
  <# if ( data.size ) { #>
183
  <li class="typography-font-size">
184
-
185
  <div class="slider-custom-control">
186
-
187
  <# if ( data.size.label ) { #>
188
  <span class="customize-control-title">{{ data.size.label }}</span>
189
  <# } #>
190
  <span class="slider-reset dashicons dashicons-image-rotate" slider-reset-value="{{ data.size.value }}"></span>
191
-
192
  <div class="slider" slider-max-value="72" slider-step-value="1"></div>
193
  <input class="customize-control-slider-value" {{{ data.size.link }}} type="number" value="{{ data.size.value }}">
194
-
195
  </div>
196
-
197
  </li>
198
  <# } #>
199
 
200
  <# if ( data.line_height ) { #>
201
  <li class="typography-line-height">
202
-
203
  <div class="slider-custom-control">
204
-
205
  <# if ( data.line_height.label ) { #>
206
  <span class="customize-control-title">{{ data.line_height.label }}</span>
207
  <# } #>
@@ -209,21 +184,16 @@ class OGF_Customize_Typography_Control extends WP_Customize_Control {
209
 
210
  <div class="slider" slider-max-value="3" slider-step-value=".1"></div>
211
  <input class="customize-control-slider-value" {{{ data.line_height.link }}} type="number" value="{{ data.line_height.value }}">
212
-
213
  </div>
214
-
215
  </li>
216
  <# } #>
217
 
218
  <# if ( data.color ) { #>
219
  <li class="typography-font-color">
220
-
221
  <# if ( data.color.label ) { #>
222
  <span class="customize-control-title">{{ data.color.label }}</span>
223
  <# } #>
224
-
225
  <input class="color-picker-hex" type="text" maxlength="7" {{{ data.color.link }}} value="{{ data.color.value }}" />
226
-
227
  </li>
228
  <# } #>
229
 
@@ -261,9 +231,11 @@ class OGF_Customize_Typography_Control extends WP_Customize_Control {
261
  $new_variants['0'] = esc_html__( '- Default -', 'olympus-google-fonts' );
262
 
263
  foreach ( $variants as $key => $value ) {
264
- $new_variants[] = $all_variants[ $key ];
265
  }
266
 
 
 
267
  return $new_variants;
268
  }
269
 
109
  <# } #>
110
 
111
  <select class="ogf-select" {{{ data.family.link }}}>
112
+ <option value="default">
113
+ <?php esc_html_e( 'Default Font', 'olympus-google-fonts' ); ?>
114
+ </option>
115
  <# if ( typeof ogf_custom_fonts !== "undefined" ) { #>
 
116
  <option disabled><?php esc_html_e( '- Custom Fonts -', 'olympus-google-fonts' ); ?></option>
117
  <# _.each( ogf_custom_fonts, function( font_data, font_id ) { #>
118
  <option value="cf-{{ font_id }}" <# if ( font_id === data.family.value ) { #> selected="selected" <# } #>>{{ font_data.label }}</option>
119
  <# } ) #>
120
  <# } #>
 
121
  <option disabled><?php esc_html_e( '- System Fonts -', 'olympus-google-fonts' ); ?></option>
122
  <# _.each( ogf_system_fonts, function( font_data, font_id ) { #>
123
  <option value="sf-{{ font_id }}" <# if ( font_id === data.family.value ) { #> selected="selected" <# } #>>{{ font_data.label }}</option>
124
  <# } ) #>
 
125
  <option disabled><?php esc_html_e( '- Google Fonts -', 'olympus-google-fonts' ); ?></option>
 
126
  <# _.each( ogf_font_array, function( font_data, font_id ) { #>
127
  <option value="{{ font_id }}" <# if ( font_id === data.family.value ) { #> selected="selected" <# } #>>{{ font_data.family }}</option>
128
  <# } ) #>
 
129
  </select>
 
130
  <button type="button" class="advanced-button">
131
  <span class="screen-reader-text"><?php esc_html_e( 'Advanced', 'olympus-google-fonts' ); ?></span>
132
  </button>
135
 
136
 
137
  <div class="advanced-settings-wrapper">
 
138
  <# if ( data.weight && data.weight.choices ) { #>
139
  <li class="typography-font-weight">
 
140
  <# if ( data.weight.label ) { #>
141
  <span class="customize-control-title">{{ data.weight.label }}</span>
142
  <# } #>
143
  <select {{{ data.weight.link }}}>
 
144
  <# _.each( data.weight.choices, function( label, choice ) { #>
 
145
  <option value="{{ choice }}" <# if ( choice === data.weight.value ) { #> selected="selected" <# } #>>{{ label }}</option>
 
146
  <# } ) #>
 
147
  </select>
148
  </li>
149
  <# } #>
150
 
151
  <# if ( data.style && data.style.choices ) { #>
152
  <li class="typography-font-style">
 
153
  <# if ( data.style.label ) { #>
154
  <span class="customize-control-title">{{ data.style.label }}</span>
155
  <# } #>
 
156
  <select {{{ data.style.link }}}>
 
157
  <# _.each( data.style.choices, function( label, choice ) { #>
 
158
  <option value="{{ choice }}" <# if ( choice === data.style.value ) { #> selected="selected" <# } #>>{{ label }}</option>
 
159
  <# } ) #>
 
160
  </select>
161
  </li>
162
  <# } #>
163
 
164
  <# if ( data.size ) { #>
165
  <li class="typography-font-size">
 
166
  <div class="slider-custom-control">
 
167
  <# if ( data.size.label ) { #>
168
  <span class="customize-control-title">{{ data.size.label }}</span>
169
  <# } #>
170
  <span class="slider-reset dashicons dashicons-image-rotate" slider-reset-value="{{ data.size.value }}"></span>
 
171
  <div class="slider" slider-max-value="72" slider-step-value="1"></div>
172
  <input class="customize-control-slider-value" {{{ data.size.link }}} type="number" value="{{ data.size.value }}">
 
173
  </div>
 
174
  </li>
175
  <# } #>
176
 
177
  <# if ( data.line_height ) { #>
178
  <li class="typography-line-height">
 
179
  <div class="slider-custom-control">
 
180
  <# if ( data.line_height.label ) { #>
181
  <span class="customize-control-title">{{ data.line_height.label }}</span>
182
  <# } #>
184
 
185
  <div class="slider" slider-max-value="3" slider-step-value=".1"></div>
186
  <input class="customize-control-slider-value" {{{ data.line_height.link }}} type="number" value="{{ data.line_height.value }}">
 
187
  </div>
 
188
  </li>
189
  <# } #>
190
 
191
  <# if ( data.color ) { #>
192
  <li class="typography-font-color">
 
193
  <# if ( data.color.label ) { #>
194
  <span class="customize-control-title">{{ data.color.label }}</span>
195
  <# } #>
 
196
  <input class="color-picker-hex" type="text" maxlength="7" {{{ data.color.link }}} value="{{ data.color.value }}" />
 
197
  </li>
198
  <# } #>
199
 
231
  $new_variants['0'] = esc_html__( '- Default -', 'olympus-google-fonts' );
232
 
233
  foreach ( $variants as $key => $value ) {
234
+ $new_variants[$key] = $all_variants[ $key ];
235
  }
236
 
237
+
238
+
239
  return $new_variants;
240
  }
241
 
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.2
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.2' );
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.3
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.3' );
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.2
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.3
9
 
10
  The easiest to use Google Fonts Typography Plugin. No coding required. 900+ font choices.
11