Custom Adobe Fonts (Typekit) - Version 1.0.12

Version Description

Download this release

Release Info

Developer patilvikasj
Plugin Icon 128x128 Custom Adobe Fonts (Typekit)
Version 1.0.12
Comparing to
See all releases

Code changes from version 1.0.11 to 1.0.12

classes/class-custom-typekit-fonts-admin.php CHANGED
@@ -52,7 +52,7 @@ if ( ! class_exists( 'Custom_Typekit_Fonts_Admin' ) ) :
52
  * @since 1.0.0
53
  */
54
  public function __construct() {
55
- add_action( 'admin_menu', array( $this, 'register_custom_fonts_menu' ) );
56
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
57
  add_action( 'admin_notices', array( $this, 'set_custom_typekit_fonts_notice' ) );
58
 
52
  * @since 1.0.0
53
  */
54
  public function __construct() {
55
+ add_action( 'admin_menu', array( $this, 'register_custom_fonts_menu' ), 101 );
56
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
57
  add_action( 'admin_notices', array( $this, 'set_custom_typekit_fonts_notice' ) );
58
 
classes/class-custom-typekit-fonts-render.php CHANGED
@@ -78,7 +78,7 @@ if ( ! class_exists( 'Custom_Typekit_Fonts_Render' ) ) :
78
 
79
  add_action( 'enqueue_block_editor_assets', array( $this, 'typekit_embed_css' ) );
80
  // Astra filter before creating google fonts URL.
81
- add_filter( 'astra_google_fonts', array( $this, 'remove_typekit_font_google_url' ) );
82
  }
83
 
84
  /**
@@ -158,8 +158,12 @@ if ( ! class_exists( 'Custom_Typekit_Fonts_Render' ) ) :
158
  if ( empty( $kit_info['custom-typekit-font-details'] ) ) {
159
  return $custom_fonts;
160
  }
 
 
 
 
 
161
  $new_custom_fonts = wp_parse_args( $kit_info['custom-typekit-font-details'], $custom_fonts );
162
-
163
  return $new_custom_fonts;
164
 
165
  }
@@ -199,7 +203,7 @@ if ( ! class_exists( 'Custom_Typekit_Fonts_Render' ) ) :
199
 
200
  $kit_list = get_option( 'custom-typekit-fonts' );
201
  if ( ! empty( $kit_list['custom-typekit-font-details'] ) ) {
202
- echo '<optgroup label="Typekit">';
203
  foreach ( $kit_list['custom-typekit-font-details'] as $font => $properties ) {
204
  echo '<option value="\'' . esc_attr( $font ) . '\',' . esc_attr( $properties['fallback'] ) . '" ' . selected( $font, $value, false ) . '>' . esc_html( $font ) . '</option>';
205
  }
@@ -247,6 +251,9 @@ if ( ! class_exists( 'Custom_Typekit_Fonts_Render' ) ) :
247
  if ( array_key_exists( $font_key, $fonts ) ) {
248
  unset( $fonts[ $font_key ] );
249
  }
 
 
 
250
  }
251
  }
252
 
78
 
79
  add_action( 'enqueue_block_editor_assets', array( $this, 'typekit_embed_css' ) );
80
  // Astra filter before creating google fonts URL.
81
+ add_filter( 'astra_google_fonts_selected', array( $this, 'remove_typekit_font_google_url' ) );
82
  }
83
 
84
  /**
158
  if ( empty( $kit_info['custom-typekit-font-details'] ) ) {
159
  return $custom_fonts;
160
  }
161
+ foreach ( $kit_info['custom-typekit-font-details'] as $font => $properties ) {
162
+ unset( $kit_info['custom-typekit-font-details'][ $font ] );
163
+ $font = "'" . esc_attr( $font ) . '\',' . esc_attr( $properties['fallback'] );
164
+ $kit_info['custom-typekit-font-details'][ $font ] = $properties;
165
+ }
166
  $new_custom_fonts = wp_parse_args( $kit_info['custom-typekit-font-details'], $custom_fonts );
 
167
  return $new_custom_fonts;
168
 
169
  }
203
 
204
  $kit_list = get_option( 'custom-typekit-fonts' );
205
  if ( ! empty( $kit_list['custom-typekit-font-details'] ) ) {
206
+ echo '<optgroup label="Adobe Fonts">';
207
  foreach ( $kit_list['custom-typekit-font-details'] as $font => $properties ) {
208
  echo '<option value="\'' . esc_attr( $font ) . '\',' . esc_attr( $properties['fallback'] ) . '" ' . selected( $font, $value, false ) . '>' . esc_html( $font ) . '</option>';
209
  }
251
  if ( array_key_exists( $font_key, $fonts ) ) {
252
  unset( $fonts[ $font_key ] );
253
  }
254
+ if ( array_key_exists( $key, $fonts ) ) {
255
+ unset( $fonts[ $key ] );
256
+ }
257
  }
258
  }
259
 
custom-typekit-fonts.php CHANGED
@@ -6,7 +6,7 @@
6
  * Author: Brainstorm Force
7
  * Author URI: http://www.brainstormforce.com
8
  * Text Domain: custom-typekit-fonts
9
- * Version: 1.0.11
10
  *
11
  * @package Typekit_Custom_Fonts
12
  */
@@ -25,7 +25,7 @@ define( 'CUSTOM_TYPEKIT_FONTS_FILE', __FILE__ );
25
  define( 'CUSTOM_TYPEKIT_FONTS_BASE', plugin_basename( CUSTOM_TYPEKIT_FONTS_FILE ) );
26
  define( 'CUSTOM_TYPEKIT_FONTS_DIR', plugin_dir_path( CUSTOM_TYPEKIT_FONTS_FILE ) );
27
  define( 'CUSTOM_TYPEKIT_FONTS_URI', plugins_url( '/', CUSTOM_TYPEKIT_FONTS_FILE ) );
28
- define( 'CUSTOM_TYPEKIT_FONTS_VER', '1.0.11' );
29
  /**
30
  * BSF Custom Fonts
31
  */
6
  * Author: Brainstorm Force
7
  * Author URI: http://www.brainstormforce.com
8
  * Text Domain: custom-typekit-fonts
9
+ * Version: 1.0.12
10
  *
11
  * @package Typekit_Custom_Fonts
12
  */
25
  define( 'CUSTOM_TYPEKIT_FONTS_BASE', plugin_basename( CUSTOM_TYPEKIT_FONTS_FILE ) );
26
  define( 'CUSTOM_TYPEKIT_FONTS_DIR', plugin_dir_path( CUSTOM_TYPEKIT_FONTS_FILE ) );
27
  define( 'CUSTOM_TYPEKIT_FONTS_URI', plugins_url( '/', CUSTOM_TYPEKIT_FONTS_FILE ) );
28
+ define( 'CUSTOM_TYPEKIT_FONTS_VER', '1.0.12' );
29
  /**
30
  * BSF Custom Fonts
31
  */
languages/custom-typekit-fonts.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the Custom Adobe Fonts (Typekit) package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Custom Adobe Fonts (Typekit) 1.0.11\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/custom-typekit-fonts\n"
8
- "POT-Creation-Date: 2019-03-25 11:29:25+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
2
  # This file is distributed under the same license as the Custom Adobe Fonts (Typekit) package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Custom Adobe Fonts (Typekit) 1.0.12\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/custom-typekit-fonts\n"
8
+ "POT-Creation-Date: 2019-08-02 10:31:30+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: brainstormforce
3
  Donate link: https://www.paypal.me/BrainstormForce
4
  Tags: custom adobe fonts, theme custom fonts, unlimited typekit custom fonts
5
  Requires at least: 4.4
6
- Tested up to: 5.1
7
- Stable tag: 1.0.11
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -49,6 +49,10 @@ If you're not using any of the supported plugins and theme, you can write the cu
49
 
50
  == Changelog ==
51
 
 
 
 
 
52
  = v1.0.11 =
53
  - Improvement: Allow whitelabel settings to be setup from using constants when using Astra Pro.
54
 
3
  Donate link: https://www.paypal.me/BrainstormForce
4
  Tags: custom adobe fonts, theme custom fonts, unlimited typekit custom fonts
5
  Requires at least: 4.4
6
+ Tested up to: 5.2.2
7
+ Stable tag: 1.0.12
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
49
 
50
  == Changelog ==
51
 
52
+ = v1.0.12 =
53
+ - Fix: Load Custom Adobe Fonts (Typekit) menu after Astra Options.
54
+ - Fix: Console errors in customizer while selecting font.
55
+
56
  = v1.0.11 =
57
  - Improvement: Allow whitelabel settings to be setup from using constants when using Astra Pro.
58