Google Fonts for WordPress - Version 1.5.1

Version Description

  • Speed up load times using preconnect.
Download this release

Release Info

Developer DannyCooper
Plugin Icon 128x128 Google Fonts for WordPress
Version 1.5.1
Comparing to
See all releases

Code changes from version 1.5.0 to 1.5.1

class-olympus-google-fonts.php CHANGED
@@ -20,6 +20,7 @@ class Olympus_Google_Fonts {
20
  $this->includes();
21
 
22
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue' ), 1000 ); // ensure our Google Font styles load last.
 
23
  add_action( 'customize_controls_enqueue_scripts', array( $this, 'customize_controls_enqueue' ) );
24
  add_action( 'customize_preview_init', array( $this, 'customize_preview_enqueue' ) );
25
 
@@ -78,6 +79,25 @@ class Olympus_Google_Fonts {
78
 
79
  }
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  /**
82
  * Register control scripts/styles.
83
  */
20
  $this->includes();
21
 
22
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue' ), 1000 ); // ensure our Google Font styles load last.
23
+ add_filter( 'wp_resource_hints', array( $this, 'resource_hints' ), 10, 2 );
24
  add_action( 'customize_controls_enqueue_scripts', array( $this, 'customize_controls_enqueue' ) );
25
  add_action( 'customize_preview_init', array( $this, 'customize_preview_enqueue' ) );
26
 
79
 
80
  }
81
 
82
+ /**
83
+ * Add preconnect for Google Fonts.
84
+ *
85
+ * @param array $urls URLs to print for resource hints.
86
+ * @param string $relation_type The relation type the URLs are printed.
87
+ * @return array $urls URLs to print for resource hints.
88
+ */
89
+ public function resource_hints( $urls, $relation_type ) {
90
+
91
+ if ( wp_style_is( 'olympus-google-fonts', 'queue' ) && 'preconnect' === $relation_type ) {
92
+ $urls[] = array(
93
+ 'href' => 'https://fonts.gstatic.com',
94
+ 'crossorigin',
95
+ );
96
+ }
97
+ return $urls;
98
+
99
+ }
100
+
101
  /**
102
  * Register control scripts/styles.
103
  */
olympus-google-fonts.php CHANGED
@@ -5,7 +5,7 @@
5
  * Plugin Name: Google Fonts for WordPress
6
  * Plugin URI: https://wordpress.org/plugins/olympus-google-fonts/
7
  * Description: The easiest to use Google Fonts plugin. No coding required. 870+ font choices.
8
- * Version: 1.5.0
9
  * Author: Danny Cooper
10
  * Author URI: https://fontsplugin.com
11
  * Text Domain: olympus-google-fonts
@@ -18,7 +18,7 @@
18
  * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
19
  */
20
 
21
- define( 'OGF_VERSION', '1.5.0' );
22
  define( 'OGF_DIR_PATH', plugin_dir_path( __FILE__ ) );
23
  define( 'OGF_DIR_URL', plugin_dir_url( __FILE__ ) );
24
 
5
  * Plugin Name: Google Fonts for WordPress
6
  * Plugin URI: https://wordpress.org/plugins/olympus-google-fonts/
7
  * Description: The easiest to use Google Fonts plugin. No coding required. 870+ font choices.
8
+ * Version: 1.5.1
9
  * Author: Danny Cooper
10
  * Author URI: https://fontsplugin.com
11
  * Text Domain: olympus-google-fonts
18
  * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
19
  */
20
 
21
+ define( 'OGF_VERSION', '1.5.1' );
22
  define( 'OGF_DIR_PATH', plugin_dir_path( __FILE__ ) );
23
  define( 'OGF_DIR_URL', plugin_dir_url( __FILE__ ) );
24
 
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: DannyCooper, googlefonts
3
  Tags: google, fonts, google fonts, google fonts for wordpress, gutenberg
4
  Donate link: https://fontsplugin.com/#pricing
5
  Requires at least: 4.0
6
- Tested up to: 5.0
7
  License: GPLv2 or later
8
- Stable tag: 1.5.0
9
 
10
  The easiest to use Google Fonts Plugin. No coding required. 870+ font choices.
11
 
@@ -73,6 +73,8 @@ There are various ways you can contribute:
73
  3. Translate the Google Fonts for WordPress plugin into [different languages](https://translate.wordpress.org/projects/wp-plugins/olympus-google-fonts/)
74
  4. Provide feedback and suggestions on [enhancements](https://github.com/DannyCooper/olympus-google-fonts/issues?direction=desc&labels=Enhancement&page=1&sort=created&state=open)
75
 
 
 
76
  == Installation ==
77
  Upload 'Google Fonts for WordPress', activate it, and you're done!
78
 
@@ -92,42 +94,10 @@ We are 99.99% certain it will, if it doesn't then please create a [support ticke
92
 
93
  == Changelog ==
94
 
95
- = 1.5.0 =
96
-
97
- * Fix problem with italics not being loaded.
98
-
99
- = 1.4.8 =
100
-
101
- * Improve theme compatibility
102
- * Update .pot
103
-
104
- = 1.4.7 =
105
-
106
- * Fix conflict with Kirki
107
-
108
- = 1.4.6 =
109
-
110
- * Improve theme compatibility
111
- * Optimize block code
112
- * Update translation files
113
 
114
- = 1.4.5 =
115
 
116
- * Fix subset issue in 1.4.4
117
-
118
- = 1.4.4 =
119
-
120
- * Update fonts
121
-
122
- = 1.4.3 =
123
-
124
- * Add Gutenberg block
125
-
126
- = 1.4.2 =
127
-
128
- * Improve feedback mechanism
129
-
130
- = 1.4.1 =
131
 
132
- * Fix previewer not showing fonts
133
- * Add new fonts
3
  Tags: google, fonts, google fonts, google fonts for wordpress, gutenberg
4
  Donate link: https://fontsplugin.com/#pricing
5
  Requires at least: 4.0
6
+ Tested up to: 5.1
7
  License: GPLv2 or later
8
+ Stable tag: 1.5.1
9
 
10
  The easiest to use Google Fonts Plugin. No coding required. 870+ font choices.
11
 
73
  3. Translate the Google Fonts for WordPress plugin into [different languages](https://translate.wordpress.org/projects/wp-plugins/olympus-google-fonts/)
74
  4. Provide feedback and suggestions on [enhancements](https://github.com/DannyCooper/olympus-google-fonts/issues?direction=desc&labels=Enhancement&page=1&sort=created&state=open)
75
 
76
+ [](http://coderisk.com/wp/plugin/olympus-google-fonts/RIPS-X52CjZr45t)
77
+
78
  == Installation ==
79
  Upload 'Google Fonts for WordPress', activate it, and you're done!
80
 
94
 
95
  == Changelog ==
96
 
97
+ = 1.5.1 =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
 
99
+ * Speed up load times using preconnect.
100
 
101
+ = 1.5.0 =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
 
103
+ * Fix problem with italics not being loaded.