Version Description
Download this release
Release Info
Developer | DannyCooper |
Plugin | Google Fonts for WordPress |
Version | 3.2.6 |
Comparing to | |
See all releases |
Code changes from version 3.2.5 to 3.2.6
- changelog.txt +4 -0
- class-olympus-google-fonts.php +1 -1
- includes/class-ogf-classic-editor.php +1 -1
- includes/class-ogf-fonts.php +2 -3
- includes/customizer/settings.php +1 -5
- includes/functions.php +9 -10
- olympus-google-fonts.php +1 -1
- readme.txt +1 -1
changelog.txt
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
= 3.2.5 =
|
2 |
|
3 |
* Update fonts list
|
1 |
+
= 3.2.6 =
|
2 |
+
|
3 |
+
* Fix Customizer error when using system fonts
|
4 |
+
|
5 |
= 3.2.5 =
|
6 |
|
7 |
* Update fonts list
|
class-olympus-google-fonts.php
CHANGED
@@ -39,7 +39,7 @@ class Olympus_Google_Fonts {
|
|
39 |
*/
|
40 |
public function constants() {
|
41 |
if ( ! defined( 'OGF_VERSION' ) ) {
|
42 |
-
define( 'OGF_VERSION', '3.2.
|
43 |
}
|
44 |
|
45 |
if ( ! defined( 'OGF_DIR_PATH' ) ) {
|
39 |
*/
|
40 |
public function constants() {
|
41 |
if ( ! defined( 'OGF_VERSION' ) ) {
|
42 |
+
define( 'OGF_VERSION', '3.2.6' );
|
43 |
}
|
44 |
|
45 |
if ( ! defined( 'OGF_DIR_PATH' ) ) {
|
includes/class-ogf-classic-editor.php
CHANGED
@@ -45,7 +45,7 @@ if ( ! class_exists( 'OGF_Classic_Editor' ) ) :
|
|
45 |
* Class constructor.
|
46 |
*/
|
47 |
public function __construct() {
|
48 |
-
if ( true === get_theme_mod( 'ogf_disable_post_level_controls',
|
49 |
return;
|
50 |
}
|
51 |
|
45 |
* Class constructor.
|
46 |
*/
|
47 |
public function __construct() {
|
48 |
+
if ( true === get_theme_mod( 'ogf_disable_post_level_controls', false ) ) {
|
49 |
return;
|
50 |
}
|
51 |
|
includes/class-ogf-fonts.php
CHANGED
@@ -100,7 +100,8 @@ class OGF_Fonts {
|
|
100 |
return array();
|
101 |
}
|
102 |
|
103 |
-
|
|
|
104 |
}
|
105 |
|
106 |
/**
|
@@ -171,7 +172,6 @@ class OGF_Fonts {
|
|
171 |
*/
|
172 |
public function build_url() {
|
173 |
$families = array();
|
174 |
-
$subsets = array();
|
175 |
|
176 |
if ( empty( $this->choices ) ) {
|
177 |
return false;
|
@@ -194,7 +194,6 @@ class OGF_Fonts {
|
|
194 |
$query_args = array(
|
195 |
'family' => implode( '|', $families ),
|
196 |
'display' => get_theme_mod( 'ogf_font_display', 'swap' ),
|
197 |
-
'subset' => 'all',
|
198 |
);
|
199 |
|
200 |
return add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
|
100 |
return array();
|
101 |
}
|
102 |
|
103 |
+
// We need both the key and value to be the subset name.
|
104 |
+
return array_combine( $subsets, $subsets );
|
105 |
}
|
106 |
|
107 |
/**
|
172 |
*/
|
173 |
public function build_url() {
|
174 |
$families = array();
|
|
|
175 |
|
176 |
if ( empty( $this->choices ) ) {
|
177 |
return false;
|
194 |
$query_args = array(
|
195 |
'family' => implode( '|', $families ),
|
196 |
'display' => get_theme_mod( 'ogf_font_display', 'swap' ),
|
|
|
197 |
);
|
198 |
|
199 |
return add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
|
includes/customizer/settings.php
CHANGED
@@ -274,6 +274,7 @@ function ogf_customize_register( $wp_customize ) {
|
|
274 |
);
|
275 |
|
276 |
$fonts = new OGF_Fonts();
|
|
|
277 |
|
278 |
if ( $fonts->has_google_fonts() ) {
|
279 |
|
@@ -326,11 +327,6 @@ function ogf_customize_register( $wp_customize ) {
|
|
326 |
)
|
327 |
);
|
328 |
|
329 |
-
}
|
330 |
-
|
331 |
-
$subsets = [];
|
332 |
-
|
333 |
-
foreach ( $fonts->choices as $font_id ) {
|
334 |
$subsets = array_merge( $subsets, $fonts->get_font_subsets( $font_id ) );
|
335 |
}
|
336 |
|
274 |
);
|
275 |
|
276 |
$fonts = new OGF_Fonts();
|
277 |
+
$subsets = [];
|
278 |
|
279 |
if ( $fonts->has_google_fonts() ) {
|
280 |
|
327 |
)
|
328 |
);
|
329 |
|
|
|
|
|
|
|
|
|
|
|
330 |
$subsets = array_merge( $subsets, $fonts->get_font_subsets( $font_id ) );
|
331 |
}
|
332 |
|
includes/functions.php
CHANGED
@@ -45,7 +45,7 @@ function ogf_get_elements() {
|
|
45 |
'label' => esc_html__( 'Headings Typography', 'olympus-google-fonts' ),
|
46 |
'description' => esc_html__( 'Select and configure the font for your headings.', 'olympus-google-fonts' ),
|
47 |
'section' => 'ogf_basic',
|
48 |
-
'selectors' => '#site-title, .site-title, #site-title a, .site-title a, .entry-title, .entry-title a, h1, h2, h3, h4, h5, h6, .widget-title',
|
49 |
),
|
50 |
'ogf_inputs' => array(
|
51 |
'label' => esc_html__( 'Buttons and Inputs Typography', 'olympus-google-fonts' ),
|
@@ -75,43 +75,43 @@ function ogf_get_elements() {
|
|
75 |
'label' => esc_html__( 'Content Typography', 'olympus-google-fonts' ),
|
76 |
'description' => esc_html__( 'Select and configure the font for your post and page content.', 'olympus-google-fonts' ),
|
77 |
'section' => 'ogf_advanced__content',
|
78 |
-
'selectors' => '.entry-content, .entry-content p, .post-content, .page-content, .post-excerpt, .entry-summary, .entry-excerpt, .excerpt, .excerpt p, .type-post p, .type-page p, .wp-block-post-content, .wp-block-post-excerpt',
|
79 |
),
|
80 |
'ogf_post_page_h1' => array(
|
81 |
'label' => esc_html__( 'Title and H1 Typography', 'olympus-google-fonts' ),
|
82 |
'description' => esc_html__( 'Select and configure the font for your title and H1 headings.', 'olympus-google-fonts' ),
|
83 |
'section' => 'ogf_advanced__content',
|
84 |
-
'selectors' => '.wp-block-post-title, .wp-block-post-title a, .entry-title, .entry-title a, .post-title, .post-title a, .page-title, .entry-content h1, #content h1, .type-post h1, .type-page h1',
|
85 |
),
|
86 |
'ogf_post_page_h2' => array(
|
87 |
'label' => esc_html__( 'H2 Typography', 'olympus-google-fonts' ),
|
88 |
'description' => esc_html__( 'Select and configure the font for your H2 headings.', 'olympus-google-fonts' ),
|
89 |
'section' => 'ogf_advanced__content',
|
90 |
-
'selectors' => '.entry-content h2, .post-content h2, .page-content h2, #content h2, .type-post h2, .type-page h2',
|
91 |
),
|
92 |
'ogf_post_page_h3' => array(
|
93 |
'label' => esc_html__( 'H3 Typography', 'olympus-google-fonts' ),
|
94 |
'description' => esc_html__( 'Select and configure the font for your H3 headings.', 'olympus-google-fonts' ),
|
95 |
'section' => 'ogf_advanced__content',
|
96 |
-
'selectors' => '.entry-content h3, .post-content h3, .page-content h3, #content h3, .type-post h3, .type-page h3',
|
97 |
),
|
98 |
'ogf_post_page_h4' => array(
|
99 |
'label' => esc_html__( 'H4 Typography', 'olympus-google-fonts' ),
|
100 |
'description' => esc_html__( 'Select and configure the font for your H4 headings.', 'olympus-google-fonts' ),
|
101 |
'section' => 'ogf_advanced__content',
|
102 |
-
'selectors' => '.entry-content h4, .post-content h4, .page-content h4, #content h4, .type-post h4, .type-page h4',
|
103 |
),
|
104 |
'ogf_post_page_h5' => array(
|
105 |
'label' => esc_html__( 'H5 Typography', 'olympus-google-fonts' ),
|
106 |
'description' => esc_html__( 'Select and configure the font for your H5 headings.', 'olympus-google-fonts' ),
|
107 |
'section' => 'ogf_advanced__content',
|
108 |
-
'selectors' => '.entry-content h5, .post-content h5, .page-content h5, #content h5, .type-post h5, .type-page h5',
|
109 |
),
|
110 |
'ogf_post_page_h6' => array(
|
111 |
'label' => esc_html__( 'H6 Typography', 'olympus-google-fonts' ),
|
112 |
'description' => esc_html__( 'Select and configure the font for your H6 headings.', 'olympus-google-fonts' ),
|
113 |
'section' => 'ogf_advanced__content',
|
114 |
-
'selectors' => '.entry-content h6, .post-content h6, .page-content h6, #content h6, .type-post h6, .type-page h6',
|
115 |
),
|
116 |
'ogf_blockquotes' => array(
|
117 |
'label' => esc_html__( 'Quotes', 'olympus-google-fonts' ),
|
@@ -170,10 +170,9 @@ function ogf_fonts_array() {
|
|
170 |
foreach ( $fonts_array['items'] as $font ) {
|
171 |
$id = trim( strtolower( str_replace( ' ', '-', $font['f'] ) ) );
|
172 |
$fonts[ $id ] = $font;
|
173 |
-
$fonts[ $id ]['v'] = array_flip($fonts[ $id ]['v']);
|
174 |
}
|
175 |
|
176 |
-
|
177 |
return $fonts;
|
178 |
}
|
179 |
|
45 |
'label' => esc_html__( 'Headings Typography', 'olympus-google-fonts' ),
|
46 |
'description' => esc_html__( 'Select and configure the font for your headings.', 'olympus-google-fonts' ),
|
47 |
'section' => 'ogf_basic',
|
48 |
+
'selectors' => '#site-title, .site-title, #site-title a, .site-title a, .entry-title, .entry-title a, h1, h2, h3, h4, h5, h6, .widget-title, .elementor-heading-title',
|
49 |
),
|
50 |
'ogf_inputs' => array(
|
51 |
'label' => esc_html__( 'Buttons and Inputs Typography', 'olympus-google-fonts' ),
|
75 |
'label' => esc_html__( 'Content Typography', 'olympus-google-fonts' ),
|
76 |
'description' => esc_html__( 'Select and configure the font for your post and page content.', 'olympus-google-fonts' ),
|
77 |
'section' => 'ogf_advanced__content',
|
78 |
+
'selectors' => '.entry-content, .entry-content p, .post-content, .page-content, .post-excerpt, .entry-summary, .entry-excerpt, .excerpt, .excerpt p, .type-post p, .type-page p, .wp-block-post-content, .wp-block-post-excerpt, .elementor, .elementor p',
|
79 |
),
|
80 |
'ogf_post_page_h1' => array(
|
81 |
'label' => esc_html__( 'Title and H1 Typography', 'olympus-google-fonts' ),
|
82 |
'description' => esc_html__( 'Select and configure the font for your title and H1 headings.', 'olympus-google-fonts' ),
|
83 |
'section' => 'ogf_advanced__content',
|
84 |
+
'selectors' => '.wp-block-post-title, .wp-block-post-title a, .entry-title, .entry-title a, .post-title, .post-title a, .page-title, .entry-content h1, #content h1, .type-post h1, .type-page h1, .elementor h1',
|
85 |
),
|
86 |
'ogf_post_page_h2' => array(
|
87 |
'label' => esc_html__( 'H2 Typography', 'olympus-google-fonts' ),
|
88 |
'description' => esc_html__( 'Select and configure the font for your H2 headings.', 'olympus-google-fonts' ),
|
89 |
'section' => 'ogf_advanced__content',
|
90 |
+
'selectors' => '.entry-content h2, .post-content h2, .page-content h2, #content h2, .type-post h2, .type-page h2, .elementor h2',
|
91 |
),
|
92 |
'ogf_post_page_h3' => array(
|
93 |
'label' => esc_html__( 'H3 Typography', 'olympus-google-fonts' ),
|
94 |
'description' => esc_html__( 'Select and configure the font for your H3 headings.', 'olympus-google-fonts' ),
|
95 |
'section' => 'ogf_advanced__content',
|
96 |
+
'selectors' => '.entry-content h3, .post-content h3, .page-content h3, #content h3, .type-post h3, .type-page h3, .elementor h3',
|
97 |
),
|
98 |
'ogf_post_page_h4' => array(
|
99 |
'label' => esc_html__( 'H4 Typography', 'olympus-google-fonts' ),
|
100 |
'description' => esc_html__( 'Select and configure the font for your H4 headings.', 'olympus-google-fonts' ),
|
101 |
'section' => 'ogf_advanced__content',
|
102 |
+
'selectors' => '.entry-content h4, .post-content h4, .page-content h4, #content h4, .type-post h4, .type-page h4, .elementor h4',
|
103 |
),
|
104 |
'ogf_post_page_h5' => array(
|
105 |
'label' => esc_html__( 'H5 Typography', 'olympus-google-fonts' ),
|
106 |
'description' => esc_html__( 'Select and configure the font for your H5 headings.', 'olympus-google-fonts' ),
|
107 |
'section' => 'ogf_advanced__content',
|
108 |
+
'selectors' => '.entry-content h5, .post-content h5, .page-content h5, #content h5, .type-post h5, .type-page h5, .elementor h5',
|
109 |
),
|
110 |
'ogf_post_page_h6' => array(
|
111 |
'label' => esc_html__( 'H6 Typography', 'olympus-google-fonts' ),
|
112 |
'description' => esc_html__( 'Select and configure the font for your H6 headings.', 'olympus-google-fonts' ),
|
113 |
'section' => 'ogf_advanced__content',
|
114 |
+
'selectors' => '.entry-content h6, .post-content h6, .page-content h6, #content h6, .type-post h6, .type-page h6, .elementor h6',
|
115 |
),
|
116 |
'ogf_blockquotes' => array(
|
117 |
'label' => esc_html__( 'Quotes', 'olympus-google-fonts' ),
|
170 |
foreach ( $fonts_array['items'] as $font ) {
|
171 |
$id = trim( strtolower( str_replace( ' ', '-', $font['f'] ) ) );
|
172 |
$fonts[ $id ] = $font;
|
173 |
+
$fonts[ $id ]['v'] = array_flip( $fonts[ $id ]['v'] );
|
174 |
}
|
175 |
|
|
|
176 |
return $fonts;
|
177 |
}
|
178 |
|
olympus-google-fonts.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Plugin Name: Fonts Plugin | Google Fonts Typography
|
6 |
* Plugin URI: https://wordpress.org/plugins/olympus-google-fonts/
|
7 |
* Description: The easiest to use Google Fonts Plugin. No coding required. Optimized for Speed. 1000+ font choices.
|
8 |
-
* Version: 3.2.
|
9 |
* Author: Fonts Plugin
|
10 |
* Author URI: https://fontsplugin.com/?utm_source=wporg&utm_medium=readme&utm_campaign=description
|
11 |
* Text Domain: olympus-google-fonts
|
5 |
* Plugin Name: Fonts Plugin | Google Fonts Typography
|
6 |
* Plugin URI: https://wordpress.org/plugins/olympus-google-fonts/
|
7 |
* Description: The easiest to use Google Fonts Plugin. No coding required. Optimized for Speed. 1000+ font choices.
|
8 |
+
* Version: 3.2.6
|
9 |
* Author: Fonts Plugin
|
10 |
* Author URI: https://fontsplugin.com/?utm_source=wporg&utm_medium=readme&utm_campaign=description
|
11 |
* Text Domain: olympus-google-fonts
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: https://fontsplugin.com/#pricing
|
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 6.1
|
7 |
License: GPLv2 or later
|
8 |
-
Stable tag: 3.2.
|
9 |
|
10 |
The easiest to use Google Fonts Plugin. No coding required. Optimized for Speed. 1000+ font choices.
|
11 |
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 6.1
|
7 |
License: GPLv2 or later
|
8 |
+
Stable tag: 3.2.6
|
9 |
|
10 |
The easiest to use Google Fonts Plugin. No coding required. Optimized for Speed. 1000+ font choices.
|
11 |
|