Google Fonts for WordPress - Version 1.6.0

Version Description

Download this release

Release Info

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

Code changes from version 1.5.3 to 1.6.0

class-olympus-google-fonts.php CHANGED
@@ -74,7 +74,8 @@ class Olympus_Google_Fonts {
74
  $fonts = new OGF_Fonts();
75
 
76
  if ( $fonts->has_custom_fonts() ) {
77
- wp_enqueue_style( 'olympus-google-fonts', $fonts->build_url(), array(), OGF_VERSION );
 
78
  }
79
 
80
  }
74
  $fonts = new OGF_Fonts();
75
 
76
  if ( $fonts->has_custom_fonts() ) {
77
+ $url = $fonts->build_url();
78
+ wp_enqueue_style( 'olympus-google-fonts', $url, array(), OGF_VERSION );
79
  }
80
 
81
  }
includes/customizer/output-css.php CHANGED
@@ -15,6 +15,9 @@ function ogf_output_css() {
15
  <!-- Fonts Plugin CSS - https://fontsplugin.com/ -->
16
  <style>
17
  <?php
 
 
 
18
  foreach ( ogf_get_elements() as $id => $values ) {
19
  ogf_generate_css( $values['selectors'], $id );
20
  }
@@ -47,7 +50,12 @@ function ogf_generate_css( $selector, $option_name ) {
47
 
48
  $return = '';
49
 
50
- if ( $family || $font_size || $line_height || $weight || $style || $color ) {
 
 
 
 
 
51
 
52
  $return .= $selector . ' {' . PHP_EOL;
53
 
15
  <!-- Fonts Plugin CSS - https://fontsplugin.com/ -->
16
  <style>
17
  <?php
18
+
19
+ do_action( 'ogf_inline_styles' );
20
+
21
  foreach ( ogf_get_elements() as $id => $values ) {
22
  ogf_generate_css( $values['selectors'], $id );
23
  }
50
 
51
  $return = '';
52
 
53
+ if ( ( $family !== 'default' && $family ) ||
54
+ ( $line_height !== '0' && $line_height ) ||
55
+ ( $weight !== '0' && $weight ) ||
56
+ ( $style !== 'default' && $style ) ||
57
+ $font_size ||
58
+ $color ) {
59
 
60
  $return .= $selector . ' {' . PHP_EOL;
61
 
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.3
9
  * Author: Fonts Plugin
10
  * Author URI: https://fontsplugin.com/?utm_source=wporg&utm_campaign=heading
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.3' );
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.6.0
9
  * Author: Fonts Plugin
10
  * Author URI: https://fontsplugin.com/?utm_source=wporg&utm_campaign=heading
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.6.0' );
22
  define( 'OGF_DIR_PATH', plugin_dir_path( __FILE__ ) );
23
  define( 'OGF_DIR_URL', plugin_dir_url( __FILE__ ) );
24
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ 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.3
9
 
10
  The easiest to use Google Fonts Plugin. No coding required. 870+ font choices.
11
 
@@ -74,8 +74,6 @@ There are various ways you can contribute:
74
  3. Translate the Google Fonts for WordPress plugin into [different languages](https://translate.wordpress.org/projects/wp-plugins/olympus-google-fonts/)
75
  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)
76
 
77
- [](http://coderisk.com/wp/plugin/olympus-google-fonts/RIPS-X52CjZr45t)
78
-
79
  == Installation ==
80
  Upload 'Google Fonts for WordPress', activate it, and you're done!
81
 
5
  Requires at least: 4.0
6
  Tested up to: 5.1
7
  License: GPLv2 or later
8
+ Stable tag: 1.6.0
9
 
10
  The easiest to use Google Fonts Plugin. No coding required. 870+ font choices.
11
 
74
  3. Translate the Google Fonts for WordPress plugin into [different languages](https://translate.wordpress.org/projects/wp-plugins/olympus-google-fonts/)
75
  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)
76
 
 
 
77
  == Installation ==
78
  Upload 'Google Fonts for WordPress', activate it, and you're done!
79