Google Fonts for WordPress - Version 2.1.2

Version Description

Download this release

Release Info

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

Code changes from version 2.1.1 to 2.1.2

changelog.txt CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  = 2.1.1 =
2
 
3
  * Fix issue where customizer wasn't loading correct font weights.
1
+ = 2.1.2 =
2
+
3
+ * Overwrite the Classic Editor's typography using the 'Basic Settings'.
4
+
5
  = 2.1.1 =
6
 
7
  * Fix issue where customizer wasn't loading correct font weights.
includes/class-ogf-classic-editor.php CHANGED
@@ -61,9 +61,23 @@ if ( ! class_exists( 'OGF_Classic_Editor' ) ) :
61
  */
62
  public function tinymce_custom_options( $opt ) {
63
 
64
- $opt['font_formats'] = apply_filters( 'ogf_classic_font_formats', 'Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;' );
 
65
 
66
- return $opt;
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  }
68
 
69
  /**
61
  */
62
  public function tinymce_custom_options( $opt ) {
63
 
64
+ $base_type = get_theme_mod( 'ogf_body_font' );
65
+ $headings_type = get_theme_mod( 'ogf_headings_font' );
66
 
67
+ $opt['font_formats'] = apply_filters( 'ogf_classic_font_formats', 'Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;' );
68
+
69
+ if ( ! isset( $opt['content_style'] ) ) {
70
+ $opt['content_style'] = '';
71
+ }
72
+
73
+ if ( $base_type !== 'default' ) {
74
+ $opt['content_style'] .= 'body, body p { font-family: ' . $base_type . ' !important; }';
75
+ }
76
+ if ( $headings_type !== 'default' ) {
77
+ $opt['content_style'] .= 'h1, h2, h3, h4, h5, h6 { font-family: ' . $headings_type . ' !important; }';
78
+ }
79
+
80
+ return $opt;
81
  }
82
 
83
  /**
includes/customizer/controls/class-ogf-customize-multiple-fonts-control.php CHANGED
@@ -67,7 +67,7 @@ class OGF_Customize_Multiple_Fonts_Control extends WP_Customize_Control {
67
  <# if ( typeof ogf_font_array != 'undefined' ) { #>
68
  <select data-placeholder="Choose some fonts..." multiple class="ogf-select" {{{ data.link }}}>
69
  <# _.each( ogf_font_array, function( font_data, font_id ) { #>
70
- <option value="{{ font_id }}">{{ font_data.family }}</option>
71
  <# } ) #>
72
  </select>
73
  <# } #>
67
  <# if ( typeof ogf_font_array != 'undefined' ) { #>
68
  <select data-placeholder="Choose some fonts..." multiple class="ogf-select" {{{ data.link }}}>
69
  <# _.each( ogf_font_array, function( font_data, font_id ) { #>
70
+ <option value="{{ font_id }}">{{ font_data.f }}</option>
71
  <# } ) #>
72
  </select>
73
  <# } #>
olympus-google-fonts.php CHANGED
@@ -5,7 +5,7 @@
5
  * Plugin Name: Google Fonts Typography
6
  * Plugin URI: https://wordpress.org/plugins/olympus-google-fonts/
7
  * Description: The easiest to use Google Fonts typography plugin. No coding required. 900+ font choices.
8
- * Version: 2.1.1
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', '2.1.1' );
22
  define( 'OGF_DIR_PATH', plugin_dir_path( __FILE__ ) );
23
  define( 'OGF_DIR_URL', plugin_dir_url( __FILE__ ) );
24
 
5
  * Plugin Name: Google Fonts Typography
6
  * Plugin URI: https://wordpress.org/plugins/olympus-google-fonts/
7
  * Description: The easiest to use Google Fonts typography plugin. No coding required. 900+ font choices.
8
+ * Version: 2.1.2
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', '2.1.2' );
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.4
7
  License: GPLv2 or later
8
- Stable tag: 2.1.1
9
 
10
  The easiest to use Google Fonts Typography Plugin. No coding required. 900+ font choices.
11
 
5
  Requires at least: 4.0
6
  Tested up to: 5.4
7
  License: GPLv2 or later
8
+ Stable tag: 2.1.2
9
 
10
  The easiest to use Google Fonts Typography Plugin. No coding required. 900+ font choices.
11