Skip to content

Commit 2aafff2

Browse files
committed
Signed-off-by:KProvance <[email protected]>
1 parent 12ea2da commit 2aafff2

File tree

5 files changed

+45
-20
lines changed

5 files changed

+45
-20
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ Send me an email at [email protected] so I can add you to our user sp
7878

7979
### Master ###
8080

81+
= 3.3.2.5 =
82+
* Fixed: #1396 - Custom fonts cutting off multiple families in selector, after save.
83+
* Fixed: Typography attempting to queue up non google fonts on backend.
84+
* Added: #1395 - Display of child theme status in sysinfo, thanks @SiR-DanieL.
85+
8186
= 3.3.2.4 =
8287
* Fixed: #1387 - Page jump when clicking "Options Object". Thanks @rrikesh.
8388
* Added: #1392 - Filters to change the following localized strings:

ReduxCore/framework.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class ReduxFramework {
6363
// ATTENTION DEVS
6464
// Please update the build number with each push, no matter how small.
6565
// This will make for easier support when we ask users what version they are using.
66-
public static $_version = '3.3.2.4';
66+
public static $_version = '3.3.2.5';
6767
public static $_dir;
6868
public static $_url;
6969
public static $_upload_dir;

ReduxCore/inc/fields/typography/field_typography.php

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -193,30 +193,48 @@ function render() {
193193

194194
/* Font Family */
195195
if ($this->field['font-family'] === true) {
196+
197+
//if (filter_var($this->value['google'], FILTER_VALIDATE_BOOLEAN)) {
196198
if (filter_var($this->value['google'], FILTER_VALIDATE_BOOLEAN)) {
199+
200+
// Divide and conquer
197201
$fontFamily = explode(', ', $this->value['font-family'], 2);
202+
203+
// If array 0 is empty and array 1 is not
198204
if (empty($fontFamily[0]) && !empty($fontFamily[1])) {
205+
206+
// Make array 0 = array 1
199207
$fontFamily[0] = $fontFamily[1];
208+
209+
// Clear array 1
200210
$fontFamily[1] = "";
201211
}
202212
}
203213

214+
// If no fontFamily array exists, create one and set array 0
215+
// with font value
204216
if (!isset($fontFamily)) {
205217
$fontFamily = array();
206218
$fontFamily[0] = $this->value['font-family'];
207219
$fontFamily[1] = "";
208220
}
221+
222+
// Is selected font a Google font
223+
$isGoogleFont = '0';
224+
if (isset($this->parent->fonts['google'][$fontFamily[0]])) {
225+
$isGoogleFont = '1';
226+
}
227+
228+
// If not a Google font, show all font families
229+
if ($isGoogleFont != '1') {
230+
$fontFamily[0] = $this->value['font-family'];
231+
}
209232

210233
$userFonts = '0';
211234
if (true == $this->user_fonts) {
212235
$userFonts = '1';
213236
}
214237

215-
$isGoogleFont = '0';
216-
if (isset($this->parent->fonts['google'][$fontFamily[0]])) {
217-
$isGoogleFont = '1';
218-
}
219-
220238
echo '<input type="hidden" class="redux-typography-font-family ' . $this->field['class'] . '" data-user-fonts="' . $userFonts . '" name="' . $this->field['name'] . '[font-family]' . $this->field['name_suffix'] . '" value="' . $this->value['font-family'] . '" data-id="' . $this->field['id'] . '" />';
221239
echo '<input type="hidden" class="redux-typography-font-options ' . $this->field['class'] . '" name="' . $this->field['name'] . '[font-options]' . $this->field['name_suffix'] . '" value="' . $this->value['font-options'] . '" data-id="' . $this->field['id'] . '" />';
222240

@@ -233,6 +251,7 @@ function render() {
233251

234252
$googleSet = false;
235253
if ($this->field['google'] === true) {
254+
236255
// Set a flag so we know to set a header style or not
237256
echo '<input type="hidden" class="redux-typography-google' . $this->field['class'] . '" id="' . $this->field['id'] . '-google" name="' . $this->field['name'] . '[google]' . $this->field['name_suffix'] . '" type="text" value="' . $this->field['google'] . '" data-id="' . $this->field['id'] . '" />';
238257
$googleSet = true;
@@ -475,19 +494,20 @@ function render() {
475494
$style = '';
476495
if (isset($this->field['preview']['always_display'])) {
477496
if (true === filter_var( $this->field['preview']['always_display'], FILTER_VALIDATE_BOOLEAN )) {
478-
479-
$this->parent->typography_preview[$fontFamily[0]] = array(
480-
'font-style' => array($this->value['font-weight'] . $this->value['font-style']),
481-
'subset' => array($this->value['subset'])
482-
);
497+
if ($isGoogleFont == true) {
498+
$this->parent->typography_preview[$fontFamily[0]] = array(
499+
'font-style' => array($this->value['font-weight'] . $this->value['font-style']),
500+
'subset' => array($this->value['subset'])
501+
);
483502

484-
$protocol = ( ! empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443 ) ? "https:" : "http:";
485-
486-
wp_deregister_style('redux-typography-preview');
487-
wp_dequeue_style('redux-typography-preview');
488-
489-
wp_register_style( 'redux-typography-preview', $protocol . $this->makeGoogleWebfontLink( $this->parent->typography_preview ), '', time() );
490-
wp_enqueue_style( 'redux-typography-preview' );
503+
$protocol = ( ! empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443 ) ? "https:" : "http:";
504+
505+
wp_deregister_style('redux-typography-preview');
506+
wp_dequeue_style('redux-typography-preview');
507+
508+
wp_register_style( 'redux-typography-preview', $protocol . $this->makeGoogleWebfontLink( $this->parent->typography_preview ), '', time() );
509+
wp_enqueue_style( 'redux-typography-preview' );
510+
}
491511

492512
$style = 'display: block; font-family: ' . $this->value['font-family'] . '; font-weight: ' . $this->value['font-weight'] . ';' ;
493513
}

class.redux-plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ReduxFrameworkPlugin {
2525
* @const string VERSION The plugin version, used for cache-busting and script file references
2626
* @since 3.0.0
2727
*/
28-
const VERSION = '3.3.2.4';
28+
const VERSION = '3.3.2.5';
2929

3030
/**
3131
* @access protected

redux-framework.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Description: Redux is a simple, truly extensible options framework for WordPress themes and plugins.
1313
* Author: Team Redux
1414
* Author URI: http://reduxframework.com
15-
* Version: 3.3.2.4
15+
* Version: 3.3.2.5
1616
* Text Domain: redux-framework
1717
* License: GPL3+
1818
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt

0 commit comments

Comments
 (0)