Customify – A Theme Customizer Booster - Version 1.4.1

Version Description

  • Fixed Multiple local fonts
Download this release

Release Info

Developer euthelup
Plugin Icon Customify – A Theme Customizer Booster
Version 1.4.1
Comparing to
See all releases

Code changes from version 1.4.0 to 1.4.1

class-pixcustomify.php CHANGED
@@ -20,7 +20,7 @@ class PixCustomifyPlugin {
20
  * @since 1.0.0
21
  * @const string
22
  */
23
- protected $version = '1.4.0';
24
  /**
25
  * Unique identifier for your plugin.
26
  * Use this value (not the variable name) as the text domain when internationalizing strings of text. It should
20
  * @since 1.0.0
21
  * @const string
22
  */
23
+ protected $version = '1.4.1';
24
  /**
25
  * Unique identifier for your plugin.
26
  * Use this value (not the variable name) as the text domain when internationalizing strings of text. It should
customify.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Customify
4
  Plugin URI: https://pixelgrade.com
5
  Description: A Theme Customizer Booster
6
- Version: 1.4.0
7
  Author: PixelGrade
8
  Author URI: https://pixelgrade.com
9
  Author Email: contact@pixelgrade.com
3
  Plugin Name: Customify
4
  Plugin URI: https://pixelgrade.com
5
  Description: A Theme Customizer Booster
6
+ Version: 1.4.1
7
  Author: PixelGrade
8
  Author URI: https://pixelgrade.com
9
  Author Email: contact@pixelgrade.com
features/class-Font_Selector.php CHANGED
@@ -139,11 +139,11 @@ class Customify_Font_Selector extends PixCustomifyPlugin {
139
  // $value['variants'] = self::$theme_fonts[ $value['font_family'] ]['variants'];
140
 
141
  if ( false === strpos( $args['local_families'], $value['font_family'] ) ) {
142
- $args['local_families'] .= $value['font_family'];
143
  }
144
 
145
  if ( false === strpos( $args['local_srcs'], self::$theme_fonts[ $value['font_family'] ]['src'] ) ) {
146
- $args['local_srcs'] .= self::$theme_fonts[ $value['font_family'] ]['src'] . ',';
147
  }
148
  }
149
  }
@@ -179,36 +179,36 @@ class Customify_Font_Selector extends PixCustomifyPlugin {
179
 
180
  function display_webfont_script( $args ) { ?>
181
  <script type="text/javascript">
182
- var customify_font_loader = function () {
183
- var webfontargs = {
184
- classes: false,
185
- events: false
186
- };
187
  <?php if ( ! empty( $args['google_families'] ) ) { ?>
188
- webfontargs.google = { families: [<?php echo( rtrim( $args['google_families'], ',' ) ); ?>] };
189
  <?php }
190
  if ( ! empty( $args['local_families'] ) && ! empty( $args['local_srcs'] ) ) { ?>
191
- webfontargs.custom = {
192
- families: ['<?php echo( rtrim( $args['local_families'], ',' ) ); ?>'],
193
- urls: ['<?php echo rtrim( $args['local_srcs'], ',' ) ?>']
194
- };
195
  <?php } ?>
196
- WebFont.load(webfontargs);
197
- }
198
-
199
- if ( typeof WebFont !== 'undefined' ) { <?php // if there is a WebFont object, use it ?>
200
- customify_font_loader();
201
- } else { <?php // basically when we don't have the WebFont object we create the google script dynamically ?>
202
- var tk = document.createElement('script');
203
- tk.src = '//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
204
- tk.type = 'text/javascript';
205
-
206
- tk.onload = tk.onreadystatechange = function () {
207
- customify_font_loader();
208
- };
209
- var s = document.getElementsByTagName('script')[0];
210
- s.parentNode.insertBefore(tk, s);
211
- }
212
  </script>
213
  <?php
214
  }
@@ -322,7 +322,7 @@ class Customify_Font_Selector extends PixCustomifyPlugin {
322
  echo "}\n";
323
  } ?>
324
  </style>
325
- <?php
326
  }
327
 
328
  function get_field_unit( $font, $field ) {
139
  // $value['variants'] = self::$theme_fonts[ $value['font_family'] ]['variants'];
140
 
141
  if ( false === strpos( $args['local_families'], $value['font_family'] ) ) {
142
+ $args['local_families'] .= "'" . $value['font_family'] . "',";
143
  }
144
 
145
  if ( false === strpos( $args['local_srcs'], self::$theme_fonts[ $value['font_family'] ]['src'] ) ) {
146
+ $args['local_srcs'] .= "'" . self::$theme_fonts[ $value['font_family'] ]['src'] . "',";
147
  }
148
  }
149
  }
179
 
180
  function display_webfont_script( $args ) { ?>
181
  <script type="text/javascript">
182
+ var customify_font_loader = function () {
183
+ var webfontargs = {
184
+ classes: false,
185
+ events: false
186
+ };
187
  <?php if ( ! empty( $args['google_families'] ) ) { ?>
188
+ webfontargs.google = { families: [<?php echo( rtrim( $args['google_families'], ',' ) ); ?>] };
189
  <?php }
190
  if ( ! empty( $args['local_families'] ) && ! empty( $args['local_srcs'] ) ) { ?>
191
+ webfontargs.custom = {
192
+ families: [<?php echo( rtrim( $args['local_families'], ',' ) ); ?>],
193
+ urls: [<?php echo rtrim( $args['local_srcs'], ',' ) ?>]
194
+ };
195
  <?php } ?>
196
+ WebFont.load(webfontargs);
197
+ };
198
+
199
+ if ( typeof WebFont !== 'undefined' ) { <?php // if there is a WebFont object, use it ?>
200
+ customify_font_loader();
201
+ } else { <?php // basically when we don't have the WebFont object we create the google script dynamically ?>
202
+ var tk = document.createElement('script');
203
+ tk.src = '//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
204
+ tk.type = 'text/javascript';
205
+
206
+ tk.onload = tk.onreadystatechange = function () {
207
+ customify_font_loader();
208
+ };
209
+ var s = document.getElementsByTagName('script')[0];
210
+ s.parentNode.insertBefore(tk, s);
211
+ }
212
  </script>
213
  <?php
214
  }
322
  echo "}\n";
323
  } ?>
324
  </style>
325
+ <?php
326
  }
327
 
328
  function get_field_unit( $font, $field ) {
languages/customify.pot CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Customify package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Customify 1.4.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/customify\n"
7
  "POT-Creation-Date: 2017-02-13 13:29:14+00:00\n"
8
  "MIME-Version: 1.0\n"
2
  # This file is distributed under the same license as the Customify package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Customify 1.4.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/customify\n"
7
  "POT-Creation-Date: 2017-02-13 13:29:14+00:00\n"
8
  "MIME-Version: 1.0\n"
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Customify - A Theme Customizer Booster ===
2
- Contributors: pixelgrade, euthelup, babbardel, vlad.olaru, cristianfrumusanu
3
  Tags: customizer, css, editor, live, preview, customise
4
- Requires at least: 4.4.0
5
- Tested up to: 4.7.0
6
- Stable tag: 1.4.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -37,6 +37,9 @@ With [Customify](https://github.com/pixelgrade/customify), developers can easily
37
 
38
  == Changelog ==
39
 
 
 
 
40
  = 1.4.0 =
41
  * Make Customify compatible with the [4.7 customizer changes](https://make.wordpress.org/core/2016/10/12/customize-changesets-technical-design-decisions)
42
  * Add `show_if` [config option](https://github.com/pixelgrade/customify#conditional-fields)
1
  === Customify - A Theme Customizer Booster ===
2
+ Contributors: pixelgrade, euthelup, babbardel, vlad.olaru, cristianfrumusanu, raduconstantin
3
  Tags: customizer, css, editor, live, preview, customise
4
+ Requires at least: 4.5.0
5
+ Tested up to: 4.7.2
6
+ Stable tag: 1.4.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
37
 
38
  == Changelog ==
39
 
40
+ = 1.4.1 =
41
+ * Fixed Multiple local fonts
42
+
43
  = 1.4.0 =
44
  * Make Customify compatible with the [4.7 customizer changes](https://make.wordpress.org/core/2016/10/12/customize-changesets-technical-design-decisions)
45
  * Add `show_if` [config option](https://github.com/pixelgrade/customify#conditional-fields)