Custom Adobe Fonts (Typekit) - Version 1.0.4

Version Description

Download this release

Release Info

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

Code changes from version 1.0.2 to 1.0.4

classes/class-custom-typekit-fonts-admin.php CHANGED
@@ -105,13 +105,6 @@ if ( ! class_exists( 'Custom_Typekit_Fonts_Admin' ) ) :
105
  public function register_custom_fonts_menu() {
106
 
107
  $title = apply_filters( 'custom_typekit_fonts_menu_title', __( 'Typekit Fonts', 'custom-typekit-fonts' ) );
108
- add_options_page(
109
- $title,
110
- $title,
111
- 'edit_theme_options',
112
- 'custom-typekit-fonts',
113
- array( $this, 'typekit_options_page' )
114
- );
115
 
116
  add_submenu_page(
117
  'themes.php',
105
  public function register_custom_fonts_menu() {
106
 
107
  $title = apply_filters( 'custom_typekit_fonts_menu_title', __( 'Typekit Fonts', 'custom-typekit-fonts' ) );
 
 
 
 
 
 
 
108
 
109
  add_submenu_page(
110
  'themes.php',
classes/class-custom-typekit-fonts-render.php CHANGED
@@ -30,6 +30,16 @@ if ( ! class_exists( 'Custom_Typekit_Fonts_Render' ) ) :
30
  */
31
  protected $font_css;
32
 
 
 
 
 
 
 
 
 
 
 
33
  /**
34
  * Instance of Bsf_Custom_Fonts_Admin.
35
  *
@@ -57,7 +67,49 @@ if ( ! class_exists( 'Custom_Typekit_Fonts_Render' ) ) :
57
  add_action( 'astra_customizer_font_list', array( $this, 'add_customizer_font_list' ) );
58
  add_action( 'astra_render_fonts', array( $this, 'render_fonts' ) );
59
  add_filter( 'astra_custom_fonts', array( $this, 'add_typekit_fonts' ) );
60
- add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  }
62
 
63
  /**
@@ -71,15 +123,15 @@ if ( ! class_exists( 'Custom_Typekit_Fonts_Render' ) ) :
71
  return;
72
  }
73
  ?>
74
- <script>
75
- (function(d) {
76
  var config = {
77
- kitId : '<?php echo esc_js( $kit_info['custom-typekit-font-id'] ); ?>',
78
- scriptTimeout : 3000,
79
- async : true
80
  },
81
  h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='https://use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
82
- })(document);
83
  </script>
84
 
85
  <?php
@@ -147,12 +199,26 @@ if ( ! class_exists( 'Custom_Typekit_Fonts_Render' ) ) :
147
  }
148
 
149
  /**
150
- * Loads textdomain for the plugin.
151
  *
152
- * @since 1.0.0
 
153
  */
154
- function load_textdomain() {
155
- load_plugin_textdomain( 'custom-typekit-fonts' );
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  }
157
  }
158
 
30
  */
31
  protected $font_css;
32
 
33
+ /**
34
+ * Font base.
35
+ *
36
+ * This is used in case of Elementor's Font param
37
+ *
38
+ * @since 1.0.4
39
+ * @var string
40
+ */
41
+ private static $font_base = 'custom-typekit-fonts';
42
+
43
  /**
44
  * Instance of Bsf_Custom_Fonts_Admin.
45
  *
67
  add_action( 'astra_customizer_font_list', array( $this, 'add_customizer_font_list' ) );
68
  add_action( 'astra_render_fonts', array( $this, 'render_fonts' ) );
69
  add_filter( 'astra_custom_fonts', array( $this, 'add_typekit_fonts' ) );
70
+ // Beaver builder theme customizer, beaver buidler page builder.
71
+ add_filter( 'fl_theme_system_fonts', array( $this, 'bb_custom_fonts' ) );
72
+ add_filter( 'fl_builder_font_families_system', array( $this, 'bb_custom_fonts' ) );
73
+ // Elementor page builder.
74
+ add_filter( 'elementor/fonts/groups', array( $this, 'elementor_group' ) );
75
+ add_filter( 'elementor/fonts/additional_fonts', array( $this, 'add_elementor_fonts' ) );
76
+ }
77
+
78
+ /**
79
+ * Add Custom Font group to elementor font list.
80
+ *
81
+ * Group name "Custom" is added as the first element in the array.
82
+ *
83
+ * @since 1.0.4
84
+ * @param Array $font_groups default font groups in elementor.
85
+ * @return Array Modified font groups with newly added font group.
86
+ */
87
+ public function elementor_group( $font_groups ) {
88
+ $new_group[ self::$font_base ] = __( 'Typekit Fonts', 'custom-typekit-fonts' );
89
+ $font_groups = $new_group + $font_groups;
90
+
91
+ return $font_groups;
92
+ }
93
+
94
+ /**
95
+ * Add Custom Fonts to the Elementor Page builder's font param.
96
+ *
97
+ * @since 1.0.4
98
+ * @param Array $fonts Custom Font's array.
99
+ */
100
+ public function add_elementor_fonts( $fonts ) {
101
+
102
+ $all_fonts = Bsf_Custom_Fonts_Taxonomy::get_fonts();
103
+ $kit_list = get_option( 'custom-typekit-fonts' );
104
+ $fonts = $kit_list['custom-typekit-font-details'];
105
+
106
+ if ( ! empty( $fonts ) ) {
107
+ foreach ( $fonts as $font_family_name => $fonts_url ) {
108
+ $fonts[ $font_family_name ] = self::$font_base;
109
+ }
110
+ }
111
+
112
+ return $fonts;
113
  }
114
 
115
  /**
123
  return;
124
  }
125
  ?>
126
+ <script type="text/javascript">
127
+ (function(d) {
128
  var config = {
129
+ kitId : '<?php echo esc_js( $kit_info['custom-typekit-font-id'] ); ?>',
130
+ scriptTimeout : 3000,
131
+ async : true
132
  },
133
  h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='https://use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
134
+ })(document);
135
  </script>
136
 
137
  <?php
199
  }
200
 
201
  /**
202
+ * Add Custom Font list to BB theme and BB Page Builder
203
  *
204
+ * @since 1.0.3
205
+ * @param array $bb_fonts font families added by bb.
206
  */
207
+ function bb_custom_fonts( $bb_fonts ) {
208
+
209
+ $kit_list = get_option( 'custom-typekit-fonts' );
210
+ $fonts = $kit_list['custom-typekit-font-details'];
211
+ $custom_fonts = array();
212
+ if ( ! empty( $fonts ) ) :
213
+ foreach ( $fonts as $font_family_name => $fonts_url ) :
214
+ $custom_fonts[ $font_family_name ] = array(
215
+ 'fallback' => 'Verdana, Arial, sans-serif',
216
+ 'weights' => array( '100', '200', '300', '400', '500', '600', '700', '800', '900' ),
217
+ );
218
+ endforeach;
219
+ endif;
220
+
221
+ return array_merge( $bb_fonts, $custom_fonts );
222
  }
223
  }
224
 
classes/class-custom-typekit-fonts.php CHANGED
@@ -42,6 +42,9 @@ if ( ! class_exists( 'Custom_Typekit_Fonts' ) ) {
42
  add_action( 'init', array( $this, 'options_setting' ) );
43
 
44
  $this->load_files();
 
 
 
45
  }
46
 
47
  /**
@@ -166,10 +169,19 @@ if ( ! class_exists( 'Custom_Typekit_Fonts' ) ) {
166
  require_once CUSTOM_TYPEKIT_FONTS_DIR . 'classes/class-typekit-fonts-white-label.php';
167
  }
168
 
 
 
 
 
 
 
 
 
 
169
  }
170
 
171
  /**
172
  * Kicking this off by calling 'get_instance()' method
173
  */
174
  Custom_Typekit_Fonts::get_instance();
175
- }// End if().
42
  add_action( 'init', array( $this, 'options_setting' ) );
43
 
44
  $this->load_files();
45
+
46
+ // Load textdomain.
47
+ add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
48
  }
49
 
50
  /**
169
  require_once CUSTOM_TYPEKIT_FONTS_DIR . 'classes/class-typekit-fonts-white-label.php';
170
  }
171
 
172
+ /**
173
+ * Loads textdomain for the plugin.
174
+ *
175
+ * @since 1.0.0
176
+ */
177
+ function load_textdomain() {
178
+ load_plugin_textdomain( 'custom-typekit-fonts' );
179
+ }
180
+
181
  }
182
 
183
  /**
184
  * Kicking this off by calling 'get_instance()' method
185
  */
186
  Custom_Typekit_Fonts::get_instance();
187
+ }
classes/class-typekit-fonts-white-label.php CHANGED
@@ -53,9 +53,9 @@ if ( ! class_exists( 'Typekit_Fonts_White_Label' ) ) :
53
  */
54
  public function __construct() {
55
 
56
- add_filter( 'all_plugins' , array( $this, 'plugins_page' ) );
57
- add_filter( 'astra_addon_branding_options' , __CLASS__ . '::settings' );
58
- add_action( 'astra_pro_white_label_add_form' , __CLASS__ . '::add_white_lavel_form' );
59
 
60
  add_filter( 'custom_typekit_fonts_menu_title', array( $this, 'white_label_custom_typekit_fonts_title' ) );
61
  if ( is_admin() ) {
@@ -118,7 +118,7 @@ if ( ! class_exists( 'Typekit_Fonts_White_Label' ) ) :
118
  function white_label_custom_typekit_fonts_title( $title ) {
119
 
120
  if ( is_callable( 'Astra_Ext_White_Label_Markup::get_white_label' ) ) {
121
- $name = Astra_Ext_White_Label_Markup::get_white_label( 'custom-typekit-fonts', 'name' );
122
  if ( ! empty( $name ) ) {
123
  $title = $name;
124
  }
@@ -164,8 +164,8 @@ if ( ! class_exists( 'Typekit_Fonts_White_Label' ) ) :
164
  public static function settings( $settings = array() ) {
165
 
166
  $settings['custom-typekit-fonts'] = array(
167
- 'name' => '',
168
- 'description' => '',
169
  );
170
 
171
  return $settings;
53
  */
54
  public function __construct() {
55
 
56
+ add_filter( 'all_plugins', array( $this, 'plugins_page' ) );
57
+ add_filter( 'astra_addon_branding_options', __CLASS__ . '::settings' );
58
+ add_action( 'astra_pro_white_label_add_form', __CLASS__ . '::add_white_lavel_form' );
59
 
60
  add_filter( 'custom_typekit_fonts_menu_title', array( $this, 'white_label_custom_typekit_fonts_title' ) );
61
  if ( is_admin() ) {
118
  function white_label_custom_typekit_fonts_title( $title ) {
119
 
120
  if ( is_callable( 'Astra_Ext_White_Label_Markup::get_white_label' ) ) {
121
+ $name = Astra_Ext_White_Label_Markup::get_white_label( 'custom-typekit-fonts', 'name' );
122
  if ( ! empty( $name ) ) {
123
  $title = $name;
124
  }
164
  public static function settings( $settings = array() ) {
165
 
166
  $settings['custom-typekit-fonts'] = array(
167
+ 'name' => '',
168
+ 'description' => '',
169
  );
170
 
171
  return $settings;
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.2
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.2' );
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.4
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.4' );
29
  /**
30
  * BSF Custom Fonts
31
  */
languages/custom-typekit-fonts.pot CHANGED
@@ -1,15 +1,15 @@
1
- # Copyright (C) 2017 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.2\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/custom-typekit-fonts\n"
8
- "POT-Creation-Date: 2017-09-28 05:38:15+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: 2017-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
  "X-Generator: grunt-wp-i18n 0.5.4\n"
@@ -39,9 +39,6 @@ msgid "Custom Typekit Fonts settings have been successfully saved."
39
  msgstr ""
40
 
41
  #: classes/class-custom-typekit-fonts-admin.php:107
42
- #: classes/class-custom-typekit-fonts-admin.php:108
43
- #: classes/class-custom-typekit-fonts-admin.php:116
44
- #: classes/class-custom-typekit-fonts-admin.php:117
45
  msgid "Typekit Fonts"
46
  msgstr ""
47
 
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.3\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/custom-typekit-fonts\n"
8
+ "POT-Creation-Date: 2018-02-21 07:44:02+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
  "X-Generator: grunt-wp-i18n 0.5.4\n"
39
  msgstr ""
40
 
41
  #: classes/class-custom-typekit-fonts-admin.php:107
 
 
 
42
  msgid "Typekit Fonts"
43
  msgstr ""
44
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ 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: 4.8.2
7
- Stable tag: 1.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,15 +12,22 @@ Custom Typekit Fonts allows you to extends the fonts supports from the Typekit.
12
 
13
  == Description ==
14
 
15
- Custom Typekit Fonts allows you to extends the fonts supports from the Typekit.
 
 
 
 
 
 
 
16
 
17
- You don't need to include any code to get the Typekit Fonts.
18
- You can directly add Typekit ID and start using the fonts of your choice.
19
- [Astra](https://wpastra.com) WordPress Theme users can select any published kit font into the customizer.
20
 
21
- All other users can also select Font Family from Appearance -> Typekit Fonts and start using it into your custom CSS.
 
 
22
 
23
- Get more details from [Typekit](https://typekit.com/).
24
 
25
  == Installation ==
26
 
@@ -32,13 +39,22 @@ Get more details from [Typekit](https://typekit.com/).
32
 
33
  == Screenshots ==
34
 
35
- 1. Enter your Typekit ID
36
- 2. Get all published kit details from your Typekit ID
37
- 3. Select any Typekit font into the Customizer
38
- 4. Get your Typekit ID
 
 
 
39
 
40
  == Changelog ==
41
 
 
 
 
 
 
 
42
  v1.0.2
43
  * Typekit fonts support added for all themes.
44
  * White Label support added from the [Astra Pro](https://wpastra.com/pro/) plugin.
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: 4.9.4
7
+ Stable tag: 1.0.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ This plugin helps you easily embed Typekit fonts easily in your WordPress website.
16
+
17
+ Currently it works with:
18
+
19
+ * <a href="https://wpastra.com/?utm_source=wp-repo&utm_campaign=custom-typekit-fonts&utm_medium=description">Astra Theme</a>
20
+ * <a href="https://www.wpbeaverbuilder.com/?fla=713">Beaver Builder Theme</a>
21
+ * <a href="https://www.wpbeaverbuilder.com/?fla=713">Beaver Builder Plugin</a>
22
+ * <a href="https://elementor.com/?ref=1352">Elementor Page Builder</a>
23
 
24
+ How does it work?
 
 
25
 
26
+ 1. Install the plugin
27
+ 2. Enter the Kit ID that you create in Typekit
28
+ 3. And done. You will be able to see the fonts added in the settings of Astra / Beaver Builder / Elementor. Please refer screenshots.
29
 
30
+ If you're not using any of the supported plugins and theme, you can write the custom CSS to apply the fonts.
31
 
32
  == Installation ==
33
 
39
 
40
  == Screenshots ==
41
 
42
+ 1. Get your Typekit ID
43
+ 2. Enter your Typekit ID
44
+ 3. Get all published kit details from your Typekit ID
45
+ 4. Select any Typekit font from Astra Theme Customizer
46
+ 5. Select any Typekit font from Elementor
47
+ 6. Select any Typekit font from Beaver Builder
48
+ 7. Select any Typekit font from Beaver Builder Theme Customizer
49
 
50
  == Changelog ==
51
 
52
+ v1.0.4
53
+ * Fixed: Added Fonts in separate group for Elementor fonts & global fonts selection.
54
+
55
+ v1.0.3
56
+ * New: Added compatibility with Beaver Builder Theme, Beaver Builder Plugin and Elementor.
57
+
58
  v1.0.2
59
  * Typekit fonts support added for all themes.
60
  * White Label support added from the [Astra Pro](https://wpastra.com/pro/) plugin.
templates/custom-typekit-fonts-options.php CHANGED
@@ -8,7 +8,7 @@
8
  $kit_info = get_option( 'custom-typekit-fonts' );
9
  ?>
10
  <div class="wrap">
11
- <h2><?php esc_html_e( 'Typekit', 'custom-typekit-fonts' ); ?></h2>
12
  <div id="poststuff">
13
  <div id="post-body" class="metabox-holder columns-2 typekit-custom-fonts-wrap">
14
  <div id="post-body-content">
@@ -24,7 +24,7 @@ $kit_info = get_option( 'custom-typekit-fonts' );
24
  for="typekit_id"> <?php esc_html_e( 'Kit ID:', 'custom-typekit-fonts' ); ?>
25
  </label>
26
  <i class="custom-typekit-fonts-help dashicons dashicons-editor-help"
27
- title="<?php echo esc_attr__( 'Please Enter the Valid Kit ID to get the kit details.', 'custom-typekit-fonts' ); ?>"></i>
28
  </th>
29
  <td><input
30
  style="display:<?php echo esc_attr( empty( $kit_info['custom-typekit-font-details'] ) ? 'inline-block' : 'none' ); ?>"
@@ -32,7 +32,7 @@ $kit_info = get_option( 'custom-typekit-fonts' );
32
  value="<?php echo ( isset( $kit_info['custom-typekit-font-id'] ) ) ? esc_attr( $kit_info['custom-typekit-font-id'] ) : ''; ?>">
33
  <?php if ( ! empty( $kit_info['custom-typekit-font-details'] ) ) : ?>
34
  <a class="add-new-typekit button button-large"
35
- href="#"><?php echo esc_html__( 'Edit Kit ID', 'custom-typekit-fonts' ); ?></a>
36
  <?php endif; ?>
37
 
38
  <?php
@@ -42,7 +42,7 @@ $kit_info = get_option( 'custom-typekit-fonts' );
42
  }
43
  ?>
44
  <input id="submit" class="button button-large" type="submit"
45
- value=" <?php echo esc_attr( $btn ); ?> ">
46
  </td>
47
  </tr>
48
 
@@ -52,7 +52,7 @@ $kit_info = get_option( 'custom-typekit-fonts' );
52
  <label
53
  for="font-list"> <?php esc_html_e( 'Kit Details:', 'custom-typekit-fonts' ); ?> </label>
54
  <i class="custom-typekit-fonts-help dashicons dashicons-editor-help"
55
- title="<?php echo esc_attr__( 'Make sure you have published the kit from Typekit. Only published information is displayed here.', 'custom-typekit-fonts' ); ?>"></i>
56
  </th>
57
  <td>
58
  <table class="typekit-font-list">
@@ -134,7 +134,7 @@ $kit_info = get_option( 'custom-typekit-fonts' );
134
  <?php esc_html_e( '2) Select the Font Family and start using it into your custom CSS.', 'custom-typekit-fonts' ); ?>
135
  </p>
136
  <a class="submit button button-hero"
137
- href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>"><?php esc_html_e( 'Go To Customizer', 'custom-typekit-fonts' ); ?></a>
138
 
139
  </div>
140
  </div>
8
  $kit_info = get_option( 'custom-typekit-fonts' );
9
  ?>
10
  <div class="wrap">
11
+ <h2><?php esc_html_e( 'Typekit Fonts', 'custom-typekit-fonts' ); ?></h2>
12
  <div id="poststuff">
13
  <div id="post-body" class="metabox-holder columns-2 typekit-custom-fonts-wrap">
14
  <div id="post-body-content">
24
  for="typekit_id"> <?php esc_html_e( 'Kit ID:', 'custom-typekit-fonts' ); ?>
25
  </label>
26
  <i class="custom-typekit-fonts-help dashicons dashicons-editor-help"
27
+ title="<?php echo esc_attr__( 'Please Enter the Valid Kit ID to get the kit details.', 'custom-typekit-fonts' ); ?>"></i>
28
  </th>
29
  <td><input
30
  style="display:<?php echo esc_attr( empty( $kit_info['custom-typekit-font-details'] ) ? 'inline-block' : 'none' ); ?>"
32
  value="<?php echo ( isset( $kit_info['custom-typekit-font-id'] ) ) ? esc_attr( $kit_info['custom-typekit-font-id'] ) : ''; ?>">
33
  <?php if ( ! empty( $kit_info['custom-typekit-font-details'] ) ) : ?>
34
  <a class="add-new-typekit button button-large"
35
+ href="#"><?php echo esc_html__( 'Edit Kit ID', 'custom-typekit-fonts' ); ?></a>
36
  <?php endif; ?>
37
 
38
  <?php
42
  }
43
  ?>
44
  <input id="submit" class="button button-large" type="submit"
45
+ value=" <?php echo esc_attr( $btn ); ?> ">
46
  </td>
47
  </tr>
48
 
52
  <label
53
  for="font-list"> <?php esc_html_e( 'Kit Details:', 'custom-typekit-fonts' ); ?> </label>
54
  <i class="custom-typekit-fonts-help dashicons dashicons-editor-help"
55
+ title="<?php echo esc_attr__( 'Make sure you have published the kit from Typekit. Only published information is displayed here.', 'custom-typekit-fonts' ); ?>"></i>
56
  </th>
57
  <td>
58
  <table class="typekit-font-list">
134
  <?php esc_html_e( '2) Select the Font Family and start using it into your custom CSS.', 'custom-typekit-fonts' ); ?>
135
  </p>
136
  <a class="submit button button-hero"
137
+ href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>"><?php esc_html_e( 'Go To Customizer', 'custom-typekit-fonts' ); ?></a>
138
 
139
  </div>
140
  </div>
templates/white-label.php CHANGED
@@ -12,11 +12,11 @@
12
  <span class="screen-reader-text"><?php _e( 'Custom Typekit Fonts Branding', 'custom-typekit-fonts' ); ?></span>
13
  <span class="toggle-indicator" aria-hidden="true"></span>
14
  </button>
15
-
16
  <h2 class="hndle ui-sortable-handle">
17
  <span><?php _e( 'Custom Typekit Fonts Branding', 'custom-typekit-fonts' ); ?></span>
18
  </h2>
19
-
20
  <div class="inside">
21
  <div class="form-wrap">
22
  <div class="form-field">
12
  <span class="screen-reader-text"><?php _e( 'Custom Typekit Fonts Branding', 'custom-typekit-fonts' ); ?></span>
13
  <span class="toggle-indicator" aria-hidden="true"></span>
14
  </button>
15
+
16
  <h2 class="hndle ui-sortable-handle">
17
  <span><?php _e( 'Custom Typekit Fonts Branding', 'custom-typekit-fonts' ); ?></span>
18
  </h2>
19
+
20
  <div class="inside">
21
  <div class="form-wrap">
22
  <div class="form-field">