Custom Adobe Fonts (Typekit) - Version 1.0.10

Version Description

Download this release

Release Info

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

Code changes from version 1.0.9 to 1.0.10

classes/class-custom-typekit-fonts-render.php CHANGED
@@ -65,7 +65,7 @@ if ( ! class_exists( 'Custom_Typekit_Fonts_Render' ) ) :
65
  public function __construct() {
66
 
67
  add_action( 'wp_enqueue_scripts', array( $this, 'typekit_embed_css' ) );
68
- // add Custom Font list into Astra customizer.
69
  add_action( 'astra_customizer_font_list', array( $this, 'add_customizer_font_list' ) );
70
  add_action( 'astra_render_fonts', array( $this, 'render_fonts' ) );
71
  add_filter( 'astra_custom_fonts', array( $this, 'add_typekit_fonts' ) );
@@ -77,6 +77,8 @@ if ( ! class_exists( 'Custom_Typekit_Fonts_Render' ) ) :
77
  add_filter( 'elementor/fonts/additional_fonts', array( $this, 'add_elementor_fonts' ) );
78
 
79
  add_action( 'enqueue_block_editor_assets', array( $this, 'typekit_embed_css' ) );
 
 
80
  }
81
 
82
  /**
@@ -229,6 +231,27 @@ if ( ! class_exists( 'Custom_Typekit_Fonts_Render' ) ) :
229
 
230
  return array_merge( $bb_fonts, $custom_fonts );
231
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
  }
233
 
234
  /**
65
  public function __construct() {
66
 
67
  add_action( 'wp_enqueue_scripts', array( $this, 'typekit_embed_css' ) );
68
+ // Add Custom Font list into Astra customizer.
69
  add_action( 'astra_customizer_font_list', array( $this, 'add_customizer_font_list' ) );
70
  add_action( 'astra_render_fonts', array( $this, 'render_fonts' ) );
71
  add_filter( 'astra_custom_fonts', array( $this, 'add_typekit_fonts' ) );
77
  add_filter( 'elementor/fonts/additional_fonts', array( $this, 'add_elementor_fonts' ) );
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
  /**
231
 
232
  return array_merge( $bb_fonts, $custom_fonts );
233
  }
234
+
235
+ /**
236
+ * Remove Typekit Font from Google Font URL.
237
+ *
238
+ * @since 1.1.0
239
+ * @param array $fonts font families selected.
240
+ */
241
+ function remove_typekit_font_google_url( $fonts ) {
242
+
243
+ $kit_list = get_option( 'custom-typekit-fonts', array() );
244
+ if ( ! empty( $kit_list['custom-typekit-font-details'] ) ) {
245
+ foreach ( $kit_list['custom-typekit-font-details'] as $key => $value ) {
246
+ $font_key = "'" . $value['family'] . "'" . ',' . $value['fallback'];
247
+ if ( array_key_exists( $font_key, $fonts ) ) {
248
+ unset( $fonts[ $font_key ] );
249
+ }
250
+ }
251
+ }
252
+
253
+ return $fonts;
254
+ }
255
  }
256
 
257
  /**
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.9
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.9' );
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.10
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.10' );
29
  /**
30
  * BSF Custom Fonts
31
  */
languages/custom-typekit-fonts.pot CHANGED
@@ -1,15 +1,15 @@
1
- # Copyright (C) 2018 Brainstorm Force
2
  # This file is distributed under the same license as the Custom Typekit Fonts package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Custom Typekit Fonts 1.0.8\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/custom-typekit-fonts\n"
8
- "POT-Creation-Date: 2018-12-27 09:11:35+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
  "Language: en\n"
@@ -39,7 +39,7 @@ msgid "Custom Typekit Fonts settings have been successfully saved."
39
  msgstr ""
40
 
41
  #: classes/class-custom-typekit-fonts-admin.php:106
42
- #: classes/class-custom-typekit-fonts-render.php:90
43
  #: templates/custom-typekit-fonts-options.php:11
44
  msgid "Typekit Fonts"
45
  msgstr ""
1
+ # Copyright (C) 2019 Brainstorm Force
2
  # This file is distributed under the same license as the Custom Typekit Fonts package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Custom Typekit Fonts 1.0.10\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/custom-typekit-fonts\n"
8
+ "POT-Creation-Date: 2019-01-22 02:37:10+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "PO-Revision-Date: 2019-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
  "Language: en\n"
39
  msgstr ""
40
 
41
  #: classes/class-custom-typekit-fonts-admin.php:106
42
+ #: classes/class-custom-typekit-fonts-render.php:94
43
  #: templates/custom-typekit-fonts-options.php:11
44
  msgid "Typekit Fonts"
45
  msgstr ""
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Custom Typekit Fonts ===
2
- Contributors: brainstormforce, rushijagani
3
  Donate link: https://wpastra.com/
4
  Tags: custom typekit fonts, theme custom fonts, unlimited typekit custom fonts
5
  Requires at least: 4.4
6
- Tested up to: 5.0
7
- Stable tag: 1.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -49,6 +49,9 @@ If you're not using any of the supported plugins and theme, you can write the cu
49
 
50
  == Changelog ==
51
 
 
 
 
52
  = v1.0.9 =
53
  - Improvement: Use CSS embed method for enqueueing TypeKit fonts. This should remove the slight delay in displaying the TypeKit fonts on the page,
54
  - Fix: Post URL in the Block Editor goes behind the Editor Top Bar.
@@ -82,4 +85,4 @@ If you're not using any of the supported plugins and theme, you can write the cu
82
  - Php waring if there is no font list handled.
83
 
84
  = v1.0.0 =
85
- - Initial release
1
  === Custom Typekit Fonts ===
2
+ Contributors: brainstormforce
3
  Donate link: https://wpastra.com/
4
  Tags: custom typekit 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.10
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.10 =
53
+ - Fix: Remove typekit font from the Astra Theme's google fonts URL.
54
+
55
  = v1.0.9 =
56
  - Improvement: Use CSS embed method for enqueueing TypeKit fonts. This should remove the slight delay in displaying the TypeKit fonts on the page,
57
  - Fix: Post URL in the Block Editor goes behind the Editor Top Bar.
85
  - Php waring if there is no font list handled.
86
 
87
  = v1.0.0 =
88
+ - Initial release