Typekit Fonts for WordPress - Version 1.7.2

Version Description

  • Use Typekit's latest recommended embed code (which uses a https:// typekit embed code URL for all sites).
  • WordPress 4.3 compatibility.
  • Change plugin's textdomain to match the plugin's folder name in preparation for translate.wordpress.org translations.
Download this release

Release Info

Developer jamescollins
Plugin Icon 128x128 Typekit Fonts for WordPress
Version 1.7.2
Comparing to
See all releases

Code changes from version 1.7.1 to 1.7.2

languages/{om4-typekit-ja.mo → typekit-fonts-for-wordpress.mo} RENAMED
File without changes
languages/{om4-typekit-ja.po → typekit-fonts-for-wordpress.po} RENAMED
File without changes
languages/{om4-typekit.pot → typekit-fonts-for-wordpress.pot} RENAMED
File without changes
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Typekit Fonts for WordPress ===
2
  Contributors: jamescollins, glenn-om4
3
- Donate link: http://om4.com.au/wordpress-plugins/#donate
4
  Tags: typekit, fonts, font, design, wp, multisite, wpmu
5
- Requires at least: 3.6
6
- Tested up to: 4.2
7
- Stable tag: 1.7.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -24,8 +24,6 @@ Compatible with WordPress Multisite.
24
 
25
  This plugin is designed to function securely with both WordPress and WordPress Multisite. When the JavaScript Embed Code is entered on the settings page, the user account id is extracted from the embed code and the correctly formed Typekit Embed Code is included in the site header, so it is not possible to use the Embed Code field to include arbitrary JavaScript. The Custom CSS field is also filtered, and doesn't allow any HTML code to be entered.
26
 
27
- If the website is using HTTPS/SSL, the SSL version of the Typekit embed code is automatically used instead.
28
-
29
  **Available Languages**
30
 
31
  * Japanese – 日本語 ( ja )
@@ -63,6 +61,11 @@ Please see [this page](http://help.typekit.com/customer/portal/articles/6786-bro
63
 
64
  == Changelog ==
65
 
 
 
 
 
 
66
  = 1.7.1 =
67
  * WordPress 4.1 compatibility.
68
  * Readme updates.
1
  === Typekit Fonts for WordPress ===
2
  Contributors: jamescollins, glenn-om4
3
+ Donate link: https://om4.com.au/wordpress-plugins/#donate
4
  Tags: typekit, fonts, font, design, wp, multisite, wpmu
5
+ Requires at least: 4.0
6
+ Tested up to: 4.3.1
7
+ Stable tag: 1.7.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
24
 
25
  This plugin is designed to function securely with both WordPress and WordPress Multisite. When the JavaScript Embed Code is entered on the settings page, the user account id is extracted from the embed code and the correctly formed Typekit Embed Code is included in the site header, so it is not possible to use the Embed Code field to include arbitrary JavaScript. The Custom CSS field is also filtered, and doesn't allow any HTML code to be entered.
26
 
 
 
27
  **Available Languages**
28
 
29
  * Japanese – 日本語 ( ja )
61
 
62
  == Changelog ==
63
 
64
+ = 1.7.2 =
65
+ * Use Typekit's latest recommended embed code (which uses a https:// typekit embed code URL for all sites).
66
+ * WordPress 4.3 compatibility.
67
+ * Change plugin's textdomain to match the plugin's folder name in preparation for translate.wordpress.org translations.
68
+
69
  = 1.7.1 =
70
  * WordPress 4.1 compatibility.
71
  * Readme updates.
typekit-admin.php CHANGED
@@ -25,7 +25,7 @@ class OM4_Typekit_Admin {
25
  * Set up the Admin Settings menu
26
  */
27
  function AdminMenu() {
28
- add_options_page(__('Typekit Fonts', 'om4-typekit'), __('Typekit Fonts', 'om4-typekit'), 'manage_options', basename(__FILE__), array(& $this, 'AdminPage'));
29
  }
30
 
31
  /**
@@ -43,7 +43,7 @@ class OM4_Typekit_Admin {
43
  .typekitsettings .indent { margin-left: 2em; }
44
  </style>
45
  <?php
46
- if (isset($_POST['submit']) && check_admin_referer('om4-typekit-save-settings') && current_user_can('manage_options')) {
47
  // settings page has been submitted
48
 
49
  if (isset($_POST['embedcode'])) {
@@ -54,25 +54,25 @@ class OM4_Typekit_Admin {
54
  ?>
55
  <div id="error" class="error"><p>
56
  <?php
57
- $instructions = sprintf( __(' Please <a href="%s">click here for instructions</a> on how to obtain your Typekit embed code.', 'om4-typekit'), '#getembedcode');
58
  if (strlen($_POST['embedcode'])) {
59
  // an embed code has been submitted, but was rejected
60
- printf(__('Invalid Typekit embed code. %s', 'om4-typekit'), $instructions);
61
  } else {
62
  // no embed code was submitted
63
- printf(__('You must enter your Typekit embed code. %s', 'om4-typekit'), $instructions);
64
  }
65
  ?>
66
  </p></div>
67
  <?php
68
  } else {
69
  // ensure the Typekit account ID maps to a valid JS file on Typekit's servers (ie doesn't return a 404 error)
70
- $url = sprintf($this->typekitInstance->embedcodeurl, $this->typekitInstance->scheme, $id);
71
  $result = wp_remote_head($url);
72
  if (is_array($result) && $result['response']['code'] == 404) {
73
  ?>
74
  <div id="error" class="error"><p>
75
- <?php printf(__('Your Typekit embed code may be incorrect because <a href="%1$s" target="_blank">%1$s</a> does not exist. Please verify that your Typekit embed code is correct. If you have just published your kit, please try again in a few minutes.', 'om4-typekit'), $url); ?>
76
  </p></div>
77
  <?php
78
  }
@@ -83,73 +83,73 @@ class OM4_Typekit_Admin {
83
  }
84
  $this->typekitInstance->SaveSettings();
85
  ?>
86
- <div id="message" class="updated fade"><p><?php _e('Settings saved.', 'om4-typekit'); ?></p></div>
87
  <?php
88
  }
89
  ?>
90
  <form method="post">
91
- <?php wp_nonce_field('om4-typekit-save-settings'); ?>
92
- <h2><?php _e('Typekit Fonts for WordPress Settings', 'om4-typekit'); ?></h2>
93
- <p><?php _e('Typekit offer a service that allows you to select from a range of hundreds of high quality fonts for your WordPress website. The fonts are applied using the font-face standard, so they are standards compliant, fully licensed and accessible.', 'om4-typekit'); ?></p>
94
- <p><?php _e('To use this plugin you need to sign up with Typekit, and then configure the following options.', 'om4-typekit'); ?></p>
95
- <h3><?php _e('Register with Typekit', 'om4-typekit'); ?></h3>
96
  <ol>
97
- <li><?php printf( __('Go to <a href="%s" target="blank">typekit.com</a> and register for an account', 'om4-typekit'), 'http://typekit.com'); ?></li>
98
- <li><?php _e('Choose a few fonts to add to your account and Publish them', 'om4-typekit'); ?></li>
99
- <li id="getembedcode"><?php _e('Go to the Kit Editor and get your Embed Code (link at the top right of the screen)', 'om4-typekit'); ?></li>
100
  </ol>
101
- <h3><?php _e('Plugin Configuration', 'om4-typekit'); ?></h3>
102
  <ol start="4">
103
- <li><?php _e('Enter the whole 2 lines of your embed code into the box below.', 'om4-typekit'); ?><br />
104
- <p class="option"><label for="embedcode"><?php _e('Typekit Embed Code:', 'om4-typekit'); ?></label> <textarea name="embedcode" rows="3" cols="80"><?php echo esc_textarea( $this->typekitInstance->GetEmbedCode() ); ?></textarea><br />
105
  </li>
106
- <li><?php _e('You can add selectors using the Typekit Kit Editor. Alternatively you can define your own CSS rules in your own style sheet or using the Custom CSS Rules field below (technical note: these CSS rules will be embedded in the header of each page). Look at the advanced examples shown in the Typekit editor for ideas.', 'om4-typekit'); ?>
107
- <p class="option"><label for="css"><?php _e('Custom CSS Rules:', 'om4-typekit'); ?></label> <textarea name="css" rows="10" cols="80"><?php echo esc_textarea( $this->typekitInstance->GetCSSRules() ); ?></textarea><br />
108
- <a href="#help-css"><?php _e('Click here for help on CSS', 'om4-typekit'); ?></a>
109
  </p>
110
  </li>
111
  </ol>
112
 
113
- <p class="submit"><input name="submit" type="submit" value="<?php _e('Save Settings', 'om4-typekit'); ?>" class="button-primary" /></p>
114
  </form>
115
- <h3 id="help"><?php _e('Help', 'om4-typekit'); ?></h3>
116
- <h4 id="help-fontsnotshowing"><?php _e('Fonts not showing?', 'om4-typekit'); ?></h4>
117
  <ol>
118
- <li><?php _e('Have you created your Typekit account, added fonts to it and <strong>pressed Publish</strong>? Fonts aren\'t available until they are published.', 'om4-typekit'); ?></li>
119
- <li><?php _e('Have you <strong>waited a few minutes</strong> to allow Typekit time to send your fonts out around the world? Grab a cup of coffee and try again soon.', 'om4-typekit'); ?></li>
120
- <li><?php _e('Have you <strong>added CSS rules</strong> to display your fonts? If in doubt, just try the H2 rule shown in the example and see if that works for you.', 'om4-typekit'); ?></li>
121
  </ol>
122
- <h4 id="help-css"><?php _e('CSS', 'om4-typekit'); ?></h4>
123
- <p><?php _e('You can use CSS selectors to apply your new typekit fonts. The settings for this plugin allow you to add new CSS rules to your website to activate Typekit fonts. If you are using fonts for more than just a few elements, you may find it easier to manage this way. And using your own CSS rules is a good way to access different font weights.', 'om4-typekit'); ?></p>
124
- <p><?php _e('There are many options for using CSS, but here are a few common scenarios. Note: we\'ve used proxima-nova for our examples, you\'ll need to change proxima-nova to the name of your chosen font from Typekit - your added font names will be visible in the Kit Editor.', 'om4-typekit'); ?></p>
125
  <h5><?php _e('Headings'); ?></h5>
126
  <p>
127
- <?php _e('If you want your Typekit fonts to be used for H2 headings, add a rule like this to your CSS Rules field:', 'om4-typekit'); ?>
128
  <code>h2 { font-family: "proxima-nova-1","proxima-nova-2",sans-serif; }</code>
129
- <?php _e('(and you can add similar rules if you want to target other headings such as H3)', 'om4-typekit'); ?>
130
  </p>
131
  <h5><?php _e('Sidebar Headings'); ?></h5>
132
  <p>
133
- <?php _e('If you want your Typekit fonts to be used for sidebar H2 headings, add a rule like this to your CSS Rules field:', 'om4-typekit'); ?>
134
  <code>#sidebar h2 { font-family: "proxima-nova-1","proxima-nova-2",sans-serif; }</code>
135
  </p>
136
- <h5><?php _e('Font Weights', 'om4-typekit'); ?></h5>
137
- <p><?php _e('If your Kit contains more than one weight and/or style for a particular font, you need to use numeric <code class="inline">font-weight</code> values in your CSS rules to map to a font\'s weights.', 'om4-typekit'); ?></p>
138
- <p><?php _e('Typekit fonts have been assigned values from 100 to 900 based on information from the font\'s designer. Web browsers also do some guessing as to which weight it should display if the specific value isn\'t present. Say your font has 100, 300 and 900. If you set your text with <code class="inline">font-weight: 400</code>, it will choose the most appropriate (300 in this case).<br />Note: A <code class="inline">font-weight</code> value of 400 corresponds to <code class="inline">font-weight: normal;</code>', 'om4-typekit'); ?></p>
139
- <p><?php printf(__('See <a href="%s">this help article</a> for more details.', 'om4-typekit'), 'http://getsatisfaction.com/typekit/topics/how_do_i_use_alternate_weights_and_styles'); ?></p>
140
- <h4 id="help-css-advanced"><?php _e('Advanced targetting of fonts with CSS selectors', 'om4-typekit'); ?></h4>
141
  <p>
142
- <?php _e('You can target your fonts to specific parts of your website if you know a bit more about your current WordPress theme and where the font family is specified. All WordPress themes have a style.css file, and if you know how to check that you should be able to see the selectors in use. Or you can install Chris Pederick\'s Web Developer Toolbar for Firefox and use the CSS, View CSS option to see all the CSS rules in use for your theme. When you find the selectors that are used for font-family, you can create a rule just for that selector to override that rule.', 'om4-typekit'); ?>
143
- <?php _e('For example, if your theme has this CSS rule:', 'om4-typekit'); ?>
144
  <code>body { font-family: Arial, Helvetica, Sans-Serif; }</code>
145
- <?php _e('you could create this rule to apply your new font to the body of your website:', 'om4-typekit'); ?>
146
  <code>body { font-family: "proxima-nova-1","proxima-nova-2", sans-serif; }</code>
147
  </p>
148
- <h4 id="help-css-external"><?php _e('Where to go to get help', 'om4-typekit'); ?></h4>
149
  <p class="indent">
150
- <?php printf( __('<a href="%s" target="_blank">Typekit Support</a>', 'om4-typekit'), 'http://getsatisfaction.com/typekit/' ); ?>
151
- <br /><?php printf( __('<a href="%s" target="_blank">Sitepoint CSS Forums</a>', 'om4-typekit'), 'http://www.sitepoint.com/forums/forumdisplay.php?f=53' ); ?>
152
- <br /><?php printf( __('<a href="%s" target="_blank">W3Schools CSS Help</a>', 'om4-typekit'), 'http://www.w3schools.com/CSS/default.asp' ); ?>
153
  </p>
154
  </div>
155
  <?php
25
  * Set up the Admin Settings menu
26
  */
27
  function AdminMenu() {
28
+ add_options_page(__('Typekit Fonts', 'typekit-fonts-for-wordpress'), __('Typekit Fonts', 'typekit-fonts-for-wordpress'), 'manage_options', basename(__FILE__), array(& $this, 'AdminPage'));
29
  }
30
 
31
  /**
43
  .typekitsettings .indent { margin-left: 2em; }
44
  </style>
45
  <?php
46
+ if (isset($_POST['submit']) && check_admin_referer('typekit-fonts-for-wordpress-save-settings') && current_user_can('manage_options')) {
47
  // settings page has been submitted
48
 
49
  if (isset($_POST['embedcode'])) {
54
  ?>
55
  <div id="error" class="error"><p>
56
  <?php
57
+ $instructions = sprintf( __(' Please <a href="%s">click here for instructions</a> on how to obtain your Typekit embed code.', 'typekit-fonts-for-wordpress'), '#getembedcode');
58
  if (strlen($_POST['embedcode'])) {
59
  // an embed code has been submitted, but was rejected
60
+ printf(__('Invalid Typekit embed code. %s', 'typekit-fonts-for-wordpress'), $instructions);
61
  } else {
62
  // no embed code was submitted
63
+ printf(__('You must enter your Typekit embed code. %s', 'typekit-fonts-for-wordpress'), $instructions);
64
  }
65
  ?>
66
  </p></div>
67
  <?php
68
  } else {
69
  // ensure the Typekit account ID maps to a valid JS file on Typekit's servers (ie doesn't return a 404 error)
70
+ $url = sprintf($this->typekitInstance->embedcodeurl, $id);
71
  $result = wp_remote_head($url);
72
  if (is_array($result) && $result['response']['code'] == 404) {
73
  ?>
74
  <div id="error" class="error"><p>
75
+ <?php printf(__('Your Typekit embed code may be incorrect because <a href="%1$s" target="_blank">%1$s</a> does not exist. Please verify that your Typekit embed code is correct. If you have just published your kit, please try again in a few minutes.', 'typekit-fonts-for-wordpress'), $url); ?>
76
  </p></div>
77
  <?php
78
  }
83
  }
84
  $this->typekitInstance->SaveSettings();
85
  ?>
86
+ <div id="message" class="updated fade"><p><?php _e('Settings saved.', 'typekit-fonts-for-wordpress'); ?></p></div>
87
  <?php
88
  }
89
  ?>
90
  <form method="post">
91
+ <?php wp_nonce_field('typekit-fonts-for-wordpress-save-settings'); ?>
92
+ <h2><?php _e('Typekit Fonts for WordPress Settings', 'typekit-fonts-for-wordpress'); ?></h2>
93
+ <p><?php _e('Typekit offer a service that allows you to select from a range of hundreds of high quality fonts for your WordPress website. The fonts are applied using the font-face standard, so they are standards compliant, fully licensed and accessible.', 'typekit-fonts-for-wordpress'); ?></p>
94
+ <p><?php _e('To use this plugin you need to sign up with Typekit, and then configure the following options.', 'typekit-fonts-for-wordpress'); ?></p>
95
+ <h3><?php _e('Register with Typekit', 'typekit-fonts-for-wordpress'); ?></h3>
96
  <ol>
97
+ <li><?php printf( __('Go to <a href="%s" target="blank">typekit.com</a> and register for an account', 'typekit-fonts-for-wordpress'), 'http://typekit.com'); ?></li>
98
+ <li><?php _e('Choose a few fonts to add to your account and Publish them', 'typekit-fonts-for-wordpress'); ?></li>
99
+ <li id="getembedcode"><?php _e('Go to the Kit Editor and get your Embed Code (link at the top right of the screen)', 'typekit-fonts-for-wordpress'); ?></li>
100
  </ol>
101
+ <h3><?php _e('Plugin Configuration', 'typekit-fonts-for-wordpress'); ?></h3>
102
  <ol start="4">
103
+ <li><?php _e('Enter the whole 2 lines of your embed code into the box below.', 'typekit-fonts-for-wordpress'); ?><br />
104
+ <p class="option"><label for="embedcode"><?php _e('Typekit Embed Code:', 'typekit-fonts-for-wordpress'); ?></label> <textarea name="embedcode" rows="3" cols="80"><?php echo esc_textarea( $this->typekitInstance->GetEmbedCode() ); ?></textarea><br />
105
  </li>
106
+ <li><?php _e('You can add selectors using the Typekit Kit Editor. Alternatively you can define your own CSS rules in your own style sheet or using the Custom CSS Rules field below (technical note: these CSS rules will be embedded in the header of each page). Look at the advanced examples shown in the Typekit editor for ideas.', 'typekit-fonts-for-wordpress'); ?>
107
+ <p class="option"><label for="css"><?php _e('Custom CSS Rules:', 'typekit-fonts-for-wordpress'); ?></label> <textarea name="css" rows="10" cols="80"><?php echo esc_textarea( $this->typekitInstance->GetCSSRules() ); ?></textarea><br />
108
+ <a href="#help-css"><?php _e('Click here for help on CSS', 'typekit-fonts-for-wordpress'); ?></a>
109
  </p>
110
  </li>
111
  </ol>
112
 
113
+ <p class="submit"><input name="submit" type="submit" value="<?php _e('Save Settings', 'typekit-fonts-for-wordpress'); ?>" class="button-primary" /></p>
114
  </form>
115
+ <h3 id="help"><?php _e('Help', 'typekit-fonts-for-wordpress'); ?></h3>
116
+ <h4 id="help-fontsnotshowing"><?php _e('Fonts not showing?', 'typekit-fonts-for-wordpress'); ?></h4>
117
  <ol>
118
+ <li><?php _e('Have you created your Typekit account, added fonts to it and <strong>pressed Publish</strong>? Fonts aren\'t available until they are published.', 'typekit-fonts-for-wordpress'); ?></li>
119
+ <li><?php _e('Have you <strong>waited a few minutes</strong> to allow Typekit time to send your fonts out around the world? Grab a cup of coffee and try again soon.', 'typekit-fonts-for-wordpress'); ?></li>
120
+ <li><?php _e('Have you <strong>added CSS rules</strong> to display your fonts? If in doubt, just try the H2 rule shown in the example and see if that works for you.', 'typekit-fonts-for-wordpress'); ?></li>
121
  </ol>
122
+ <h4 id="help-css"><?php _e('CSS', 'typekit-fonts-for-wordpress'); ?></h4>
123
+ <p><?php _e('You can use CSS selectors to apply your new typekit fonts. The settings for this plugin allow you to add new CSS rules to your website to activate Typekit fonts. If you are using fonts for more than just a few elements, you may find it easier to manage this way. And using your own CSS rules is a good way to access different font weights.', 'typekit-fonts-for-wordpress'); ?></p>
124
+ <p><?php _e('There are many options for using CSS, but here are a few common scenarios. Note: we\'ve used proxima-nova for our examples, you\'ll need to change proxima-nova to the name of your chosen font from Typekit - your added font names will be visible in the Kit Editor.', 'typekit-fonts-for-wordpress'); ?></p>
125
  <h5><?php _e('Headings'); ?></h5>
126
  <p>
127
+ <?php _e('If you want your Typekit fonts to be used for H2 headings, add a rule like this to your CSS Rules field:', 'typekit-fonts-for-wordpress'); ?>
128
  <code>h2 { font-family: "proxima-nova-1","proxima-nova-2",sans-serif; }</code>
129
+ <?php _e('(and you can add similar rules if you want to target other headings such as H3)', 'typekit-fonts-for-wordpress'); ?>
130
  </p>
131
  <h5><?php _e('Sidebar Headings'); ?></h5>
132
  <p>
133
+ <?php _e('If you want your Typekit fonts to be used for sidebar H2 headings, add a rule like this to your CSS Rules field:', 'typekit-fonts-for-wordpress'); ?>
134
  <code>#sidebar h2 { font-family: "proxima-nova-1","proxima-nova-2",sans-serif; }</code>
135
  </p>
136
+ <h5><?php _e('Font Weights', 'typekit-fonts-for-wordpress'); ?></h5>
137
+ <p><?php _e('If your Kit contains more than one weight and/or style for a particular font, you need to use numeric <code class="inline">font-weight</code> values in your CSS rules to map to a font\'s weights.', 'typekit-fonts-for-wordpress'); ?></p>
138
+ <p><?php _e('Typekit fonts have been assigned values from 100 to 900 based on information from the font\'s designer. Web browsers also do some guessing as to which weight it should display if the specific value isn\'t present. Say your font has 100, 300 and 900. If you set your text with <code class="inline">font-weight: 400</code>, it will choose the most appropriate (300 in this case).<br />Note: A <code class="inline">font-weight</code> value of 400 corresponds to <code class="inline">font-weight: normal;</code>', 'typekit-fonts-for-wordpress'); ?></p>
139
+ <p><?php printf(__('See <a href="%s">this help article</a> for more details.', 'typekit-fonts-for-wordpress'), 'http://getsatisfaction.com/typekit/topics/how_do_i_use_alternate_weights_and_styles'); ?></p>
140
+ <h4 id="help-css-advanced"><?php _e('Advanced targetting of fonts with CSS selectors', 'typekit-fonts-for-wordpress'); ?></h4>
141
  <p>
142
+ <?php _e('You can target your fonts to specific parts of your website if you know a bit more about your current WordPress theme and where the font family is specified. All WordPress themes have a style.css file, and if you know how to check that you should be able to see the selectors in use. Or you can install Chris Pederick\'s Web Developer Toolbar for Firefox and use the CSS, View CSS option to see all the CSS rules in use for your theme. When you find the selectors that are used for font-family, you can create a rule just for that selector to override that rule.', 'typekit-fonts-for-wordpress'); ?>
143
+ <?php _e('For example, if your theme has this CSS rule:', 'typekit-fonts-for-wordpress'); ?>
144
  <code>body { font-family: Arial, Helvetica, Sans-Serif; }</code>
145
+ <?php _e('you could create this rule to apply your new font to the body of your website:', 'typekit-fonts-for-wordpress'); ?>
146
  <code>body { font-family: "proxima-nova-1","proxima-nova-2", sans-serif; }</code>
147
  </p>
148
+ <h4 id="help-css-external"><?php _e('Where to go to get help', 'typekit-fonts-for-wordpress'); ?></h4>
149
  <p class="indent">
150
+ <?php printf( __('<a href="%s" target="_blank">Typekit Support</a>', 'typekit-fonts-for-wordpress'), 'http://getsatisfaction.com/typekit/' ); ?>
151
+ <br /><?php printf( __('<a href="%s" target="_blank">Sitepoint CSS Forums</a>', 'typekit-fonts-for-wordpress'), 'http://www.sitepoint.com/forums/forumdisplay.php?f=53' ); ?>
152
+ <br /><?php printf( __('<a href="%s" target="_blank">W3Schools CSS Help</a>', 'typekit-fonts-for-wordpress'), 'http://www.w3schools.com/CSS/default.asp' ); ?>
153
  </p>
154
  </div>
155
  <?php
typekit.php CHANGED
@@ -3,10 +3,10 @@
3
  Plugin Name: Typekit Fonts for WordPress
4
  Plugin URI: https://om4.com.au/wordpress-plugins/typekit-fonts-for-wordpress-plugin/
5
  Description: Use a range of hundreds of high quality fonts on your WordPress website by integrating the <a href="http://typekit.com">Typekit</a> font service into your WordPress blog.
6
- Version: 1.7.1
7
  Author: OM4
8
  Author URI: https://om4.com.au/
9
- Text Domain: om4-typekit
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  */
@@ -41,8 +41,8 @@ class OM4_Typekit {
41
 
42
  var $admin;
43
 
44
- var $embedcode = '<script type="text/javascript" src="//use.typekit.net/%s.js"></script>
45
- <script type="text/javascript">try{Typekit.load();}catch(e){}</script>';
46
 
47
  /**
48
  * Perl-based regular expression that is used to extract the ID from the typekit embed code
@@ -60,7 +60,7 @@ class OM4_Typekit {
60
  *
61
  * @var string
62
  */
63
- var $embedcodeurl = '%s://use.typekit.net/%s.js';
64
 
65
  /*
66
  * Default settings
@@ -69,15 +69,6 @@ class OM4_Typekit {
69
  'id'=> '',
70
  'css' => ''
71
  );
72
-
73
- /*
74
- * HTTP scheme.
75
- *
76
- * HTTP by deafult, or HTTPS if the site is being loaded over SSL.
77
- *
78
- * @var string
79
- */
80
- var $scheme = 'http';
81
 
82
  /**
83
  * Class Constructor
@@ -100,19 +91,18 @@ class OM4_Typekit {
100
  $this->settings = $data['settings'];
101
  }
102
 
103
- if ( is_ssl() ) $this->scheme = 'https';
104
  }
105
 
106
  /**
107
  * Load up the localization file if we're using WordPress in a different language.
108
  *
109
- * Place it in this plugin's "languages" folder and name it "om4-typekit-[value in wp-config].mo".
110
  *
111
  * See languages/_readme.txt for more information.
112
  *
113
  */
114
  function LoadDomain() {
115
- load_plugin_textdomain( 'om4-typekit', false, "{$this->dirname}/languages" );
116
  }
117
 
118
  /**
3
  Plugin Name: Typekit Fonts for WordPress
4
  Plugin URI: https://om4.com.au/wordpress-plugins/typekit-fonts-for-wordpress-plugin/
5
  Description: Use a range of hundreds of high quality fonts on your WordPress website by integrating the <a href="http://typekit.com">Typekit</a> font service into your WordPress blog.
6
+ Version: 1.7.2
7
  Author: OM4
8
  Author URI: https://om4.com.au/
9
+ Text Domain: typekit-fonts-for-wordpress
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  */
41
 
42
  var $admin;
43
 
44
+ var $embedcode = '<script src="https://use.typekit.net/%s.js"></script>
45
+ <script>try{Typekit.load({ async: true });}catch(e){}</script>';
46
 
47
  /**
48
  * Perl-based regular expression that is used to extract the ID from the typekit embed code
60
  *
61
  * @var string
62
  */
63
+ var $embedcodeurl = 'https://use.typekit.net/%s.js';
64
 
65
  /*
66
  * Default settings
69
  'id'=> '',
70
  'css' => ''
71
  );
 
 
 
 
 
 
 
 
 
72
 
73
  /**
74
  * Class Constructor
91
  $this->settings = $data['settings'];
92
  }
93
 
 
94
  }
95
 
96
  /**
97
  * Load up the localization file if we're using WordPress in a different language.
98
  *
99
+ * Place it in this plugin's "languages" folder and name it "typekit-fonts-for-wordpress-[value in wp-config].mo".
100
  *
101
  * See languages/_readme.txt for more information.
102
  *
103
  */
104
  function LoadDomain() {
105
+ load_plugin_textdomain( 'typekit-fonts-for-wordpress', false, "{$this->dirname}/languages" );
106
  }
107
 
108
  /**