Version Description
Download this release
Release Info
Developer | DannyCooper |
Plugin | Google Fonts for WordPress |
Version | 3.2.1 |
Comparing to | |
See all releases |
Code changes from version 3.2.0 to 3.2.1
- assets/css/customize-controls.css +26 -21
- assets/js/customize-controls.js +7 -8
- assets/js/multiple-checkbox.js +1 -1
- changelog.txt +4 -0
- class-olympus-google-fonts.php +1 -1
- includes/customizer/controls/class-ogf-customize-multiple-checkbox-control.php +1 -1
- includes/customizer/controls/class-ogf-customize-multiple-fonts-control.php +1 -1
- includes/customizer/controls/class-ogf-customize-typography-control.php +1 -1
- includes/customizer/controls/class-ogf-customize-upsell-control.php +1 -1
- includes/customizer/settings.php +12 -7
- olympus-google-fonts.php +1 -1
- readme.txt +3 -3
assets/css/customize-controls.css
CHANGED
@@ -1,3 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
#customize-theme-controls #sub-accordion-section-ogf_basic,
|
2 |
#customize-theme-controls #sub-accordion-section-ogf_theme,
|
3 |
#customize-theme-controls #sub-accordion-section-ogf_woocommerce,
|
@@ -26,60 +31,60 @@
|
|
26 |
display: none;
|
27 |
}
|
28 |
|
29 |
-
.customize-control-typography li.typography-font-family select {
|
30 |
width: 85%;
|
31 |
}
|
32 |
|
33 |
-
.customize-control-typography li.typography-font-style,
|
34 |
-
.customize-control-typography li.typography-font-weight {
|
35 |
width: 50%;
|
36 |
float: left;
|
37 |
}
|
38 |
|
39 |
-
.customize-control-typography li.typography-font-color .wp-picker-clear {
|
40 |
min-height: 30px;
|
41 |
}
|
42 |
|
43 |
-
.customize-control-typography li.typography-font-color,
|
44 |
-
.customize-control-typography li.typography-font-size,
|
45 |
-
.customize-control-typography li.typography-line-height,
|
46 |
-
.customize-control-typography li.typography-letter-spacing {
|
47 |
clear: both;
|
48 |
max-width: 94%;
|
49 |
padding-top: 10px;
|
50 |
}
|
51 |
|
52 |
-
.customize-control-typography li.typography-font-style select,
|
53 |
-
.customize-control-typography li.typography-font-weight select {
|
54 |
width: 90%;
|
55 |
}
|
56 |
|
57 |
-
.customize-control-typography li.typography-text-decoration select,
|
58 |
-
.customize-control-typography li.typography-text-transform select {
|
59 |
width: 93%;
|
60 |
}
|
61 |
|
62 |
-
.customize-control-typography li.typography-font-weight {
|
63 |
clear: both;
|
64 |
}
|
65 |
|
66 |
-
.customize-control-typography li.typography-font-size input,
|
67 |
-
.customize-control-typography li.typography-line-height input {
|
68 |
width: 50px;
|
69 |
float: right;
|
70 |
}
|
71 |
|
72 |
-
.customize-control-typography .advanced-settings-wrapper {
|
73 |
display: none;
|
74 |
}
|
75 |
|
76 |
-
.customize-control-typography .advanced-settings-wrapper.show {
|
77 |
display: block !important;
|
78 |
margin-top: 10px;
|
79 |
background: #dadada;
|
80 |
}
|
81 |
|
82 |
-
.customize-control-typography .inner {
|
83 |
padding: 10px
|
84 |
}
|
85 |
|
@@ -115,11 +120,11 @@
|
|
115 |
padding: 2px;
|
116 |
}
|
117 |
|
118 |
-
.customize-control-typography input[type='range'] {
|
119 |
width: 90%;
|
120 |
}
|
121 |
|
122 |
-
.customize-control-typography .customize-control-notifications-container {
|
123 |
display: none;
|
124 |
}
|
125 |
|
@@ -856,6 +861,6 @@
|
|
856 |
background-position: 15px 50% !important;
|
857 |
}
|
858 |
|
859 |
-
.customize-control-typography .customize-control-title {
|
860 |
font-size: 13px;
|
861 |
}
|
1 |
+
.customize-control-checkbox label {
|
2 |
+
vertical-align: top;
|
3 |
+
font-weight: 600;
|
4 |
+
}
|
5 |
+
|
6 |
#customize-theme-controls #sub-accordion-section-ogf_basic,
|
7 |
#customize-theme-controls #sub-accordion-section-ogf_theme,
|
8 |
#customize-theme-controls #sub-accordion-section-ogf_woocommerce,
|
31 |
display: none;
|
32 |
}
|
33 |
|
34 |
+
.customize-control-ogf-typography li.typography-font-family select {
|
35 |
width: 85%;
|
36 |
}
|
37 |
|
38 |
+
.customize-control-ogf-typography li.typography-font-style,
|
39 |
+
.customize-control-ogf-typography li.typography-font-weight {
|
40 |
width: 50%;
|
41 |
float: left;
|
42 |
}
|
43 |
|
44 |
+
.customize-control-ogf-typography li.typography-font-color .wp-picker-clear {
|
45 |
min-height: 30px;
|
46 |
}
|
47 |
|
48 |
+
.customize-control-ogf-typography li.typography-font-color,
|
49 |
+
.customize-control-ogf-typography li.typography-font-size,
|
50 |
+
.customize-control-ogf-typography li.typography-line-height,
|
51 |
+
.customize-control-ogf-typography li.typography-letter-spacing {
|
52 |
clear: both;
|
53 |
max-width: 94%;
|
54 |
padding-top: 10px;
|
55 |
}
|
56 |
|
57 |
+
.customize-control-ogf-typography li.typography-font-style select,
|
58 |
+
.customize-control-ogf-typography li.typography-font-weight select {
|
59 |
width: 90%;
|
60 |
}
|
61 |
|
62 |
+
.customize-control-ogf-typography li.typography-text-decoration select,
|
63 |
+
.customize-control-ogf-typography li.typography-text-transform select {
|
64 |
width: 93%;
|
65 |
}
|
66 |
|
67 |
+
.customize-control-ogf-typography li.typography-font-weight {
|
68 |
clear: both;
|
69 |
}
|
70 |
|
71 |
+
.customize-control-ogf-typography li.typography-font-size input,
|
72 |
+
.customize-control-ogf-typography li.typography-line-height input {
|
73 |
width: 50px;
|
74 |
float: right;
|
75 |
}
|
76 |
|
77 |
+
.customize-control-ogf-typography .advanced-settings-wrapper {
|
78 |
display: none;
|
79 |
}
|
80 |
|
81 |
+
.customize-control-ogf-typography .advanced-settings-wrapper.show {
|
82 |
display: block !important;
|
83 |
margin-top: 10px;
|
84 |
background: #dadada;
|
85 |
}
|
86 |
|
87 |
+
.customize-control-ogf-typography .inner {
|
88 |
padding: 10px
|
89 |
}
|
90 |
|
120 |
padding: 2px;
|
121 |
}
|
122 |
|
123 |
+
.customize-control-ogf-typography input[type='range'] {
|
124 |
width: 90%;
|
125 |
}
|
126 |
|
127 |
+
.customize-control-ogf-typography .customize-control-notifications-container {
|
128 |
display: none;
|
129 |
}
|
130 |
|
861 |
background-position: 15px 50% !important;
|
862 |
}
|
863 |
|
864 |
+
.customize-control-ogf-typography .customize-control-title {
|
865 |
font-size: 13px;
|
866 |
}
|
assets/js/customize-controls.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
/* global ogf_font_variants, ogf_font_array, ajaxurl, fontsReset, location */
|
2 |
( function( api ) {
|
3 |
-
api.controlConstructor[ 'typography' ] = api.Control.extend(
|
4 |
{
|
5 |
ready: function() {
|
6 |
const control = this;
|
7 |
-
const controlClass = '.customize-control-typography';
|
8 |
const footerActions = jQuery( '#customize-footer-actions' );
|
9 |
//
|
10 |
// Do stuff when device icons are clicked
|
@@ -321,7 +321,7 @@ jQuery( document ).ready( function() {
|
|
321 |
|
322 |
/* === Multiple Fonts Control === */
|
323 |
( function( api ) {
|
324 |
-
api.controlConstructor[ 'typography-multiselect' ] = api.Control.extend( {
|
325 |
ready: function() {
|
326 |
const control = this;
|
327 |
// Initialize chosen.js
|
@@ -339,13 +339,12 @@ jQuery( document ).ready( function() {
|
|
339 |
|
340 |
|
341 |
(function($){
|
342 |
-
|
343 |
-
|
344 |
-
use_woff2.bind( function( value ) {
|
345 |
if( true == value ){
|
346 |
-
$('#customize-control-
|
347 |
} else {
|
348 |
-
$('#customize-control-
|
349 |
}
|
350 |
} );
|
351 |
} );
|
1 |
/* global ogf_font_variants, ogf_font_array, ajaxurl, fontsReset, location */
|
2 |
( function( api ) {
|
3 |
+
api.controlConstructor[ 'ogf-typography' ] = api.Control.extend(
|
4 |
{
|
5 |
ready: function() {
|
6 |
const control = this;
|
7 |
+
const controlClass = '.customize-control-ogf-typography';
|
8 |
const footerActions = jQuery( '#customize-footer-actions' );
|
9 |
//
|
10 |
// Do stuff when device icons are clicked
|
321 |
|
322 |
/* === Multiple Fonts Control === */
|
323 |
( function( api ) {
|
324 |
+
api.controlConstructor[ 'ogf-typography-multiselect' ] = api.Control.extend( {
|
325 |
ready: function() {
|
326 |
const control = this;
|
327 |
// Initialize chosen.js
|
339 |
|
340 |
|
341 |
(function($){
|
342 |
+
wp.customize( 'fpp_host_locally', function( fpp_host_locally ) {
|
343 |
+
fpp_host_locally.bind( function( value ) {
|
|
|
344 |
if( true == value ){
|
345 |
+
$('#customize-control-fpp_use_woff2').show();
|
346 |
} else {
|
347 |
+
$('#customize-control-fpp_use_woff2').hide();
|
348 |
}
|
349 |
} );
|
350 |
} );
|
assets/js/multiple-checkbox.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
wp.customize.controlConstructor[ 'multiple-checkbox' ] = wp.customize.Control.extend( {
|
2 |
|
3 |
// When we're finished loading continue processing.
|
4 |
ready: function() {
|
1 |
+
wp.customize.controlConstructor[ 'ogf-multiple-checkbox' ] = wp.customize.Control.extend( {
|
2 |
|
3 |
// When we're finished loading continue processing.
|
4 |
ready: function() {
|
changelog.txt
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
= 3.2.0 =
|
2 |
|
3 |
* Add WooCommerce support.
|
1 |
+
= 3.2.1 =
|
2 |
+
|
3 |
+
* Add prefixes to control types to prevent conflicts.
|
4 |
+
|
5 |
= 3.2.0 =
|
6 |
|
7 |
* Add WooCommerce support.
|
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.1' );
|
43 |
}
|
44 |
|
45 |
if ( ! defined( 'OGF_DIR_PATH' ) ) {
|
includes/customizer/controls/class-ogf-customize-multiple-checkbox-control.php
CHANGED
@@ -21,7 +21,7 @@ class OGF_Customize_Multiple_Checkbox_Control extends WP_Customize_Control {
|
|
21 |
*
|
22 |
* @var string
|
23 |
*/
|
24 |
-
public $type = 'multiple-checkbox';
|
25 |
/**
|
26 |
* Enqueue control related scripts/styles.
|
27 |
*/
|
21 |
*
|
22 |
* @var string
|
23 |
*/
|
24 |
+
public $type = 'ogf-multiple-checkbox';
|
25 |
/**
|
26 |
* Enqueue control related scripts/styles.
|
27 |
*/
|
includes/customizer/controls/class-ogf-customize-multiple-fonts-control.php
CHANGED
@@ -22,7 +22,7 @@ class OGF_Customize_Multiple_Fonts_Control extends WP_Customize_Control {
|
|
22 |
*
|
23 |
* @var string
|
24 |
*/
|
25 |
-
public $type = 'typography-multiselect';
|
26 |
|
27 |
/**
|
28 |
* Enqueue scripts/styles for the color picker.
|
22 |
*
|
23 |
* @var string
|
24 |
*/
|
25 |
+
public $type = 'ogf-typography-multiselect';
|
26 |
|
27 |
/**
|
28 |
* Enqueue scripts/styles for the color picker.
|
includes/customizer/controls/class-ogf-customize-typography-control.php
CHANGED
@@ -21,7 +21,7 @@ class OGF_Customize_Typography_Control extends WP_Customize_Control {
|
|
21 |
*
|
22 |
* @var string
|
23 |
*/
|
24 |
-
public $type = 'typography';
|
25 |
|
26 |
/**
|
27 |
* Array
|
21 |
*
|
22 |
* @var string
|
23 |
*/
|
24 |
+
public $type = 'ogf-typography';
|
25 |
|
26 |
/**
|
27 |
* Array
|
includes/customizer/controls/class-ogf-customize-upsell-control.php
CHANGED
@@ -22,7 +22,7 @@ class OGF_Customize_Upsell_Control extends WP_Customize_Control {
|
|
22 |
*
|
23 |
* @var string
|
24 |
*/
|
25 |
-
public $type = 'upsell';
|
26 |
|
27 |
/**
|
28 |
* Render the control's content.
|
22 |
*
|
23 |
* @var string
|
24 |
*/
|
25 |
+
public $type = 'ogf-upsell';
|
26 |
|
27 |
/**
|
28 |
* Render the control's content.
|
includes/customizer/settings.php
CHANGED
@@ -63,6 +63,7 @@ function ogf_customize_register( $wp_customize ) {
|
|
63 |
'label' => esc_html__( 'Load Fonts Only', 'olympus-google-fonts' ),
|
64 |
'description' => esc_html__( 'Load fonts but don\'t automatically assign them to an element.', 'olympus-google-fonts' ),
|
65 |
'section' => 'ogf_advanced__css',
|
|
|
66 |
)
|
67 |
)
|
68 |
);
|
@@ -179,6 +180,7 @@ function ogf_customize_register( $wp_customize ) {
|
|
179 |
'label' => ( isset( $values['label'] ) ? esc_attr( $values['label'] ) : '' ),
|
180 |
'description' => ( isset( $values['description'] ) ? esc_attr( $values['description'] ) : '' ),
|
181 |
'section' => ( isset( $values['section'] ) ? esc_attr( $values['section'] ) : '' ),
|
|
|
182 |
'settings' =>
|
183 |
apply_filters(
|
184 |
'ogf_typography_control_settings',
|
@@ -220,10 +222,10 @@ function ogf_customize_register( $wp_customize ) {
|
|
220 |
'force_styles',
|
221 |
array(
|
222 |
'label' => esc_html__( 'Force Styles?', 'olympus-google-fonts' ),
|
|
|
223 |
'section' => 'ogf_debugging',
|
224 |
'settings' => 'ogf_force_styles',
|
225 |
'type' => 'checkbox',
|
226 |
-
'description' => esc_html__( 'If your choices are not displaying correctly, check this box.', 'olympus-google-fonts' ),
|
227 |
)
|
228 |
);
|
229 |
|
@@ -240,10 +242,10 @@ function ogf_customize_register( $wp_customize ) {
|
|
240 |
'ogf_disable_post_level_controls',
|
241 |
array(
|
242 |
'label' => esc_html__( 'Disable Editor Controls', 'olympus-google-fonts' ),
|
|
|
243 |
'section' => 'ogf_debugging',
|
244 |
'settings' => 'ogf_disable_post_level_controls',
|
245 |
'type' => 'checkbox',
|
246 |
-
'description' => esc_html__( 'Remove font controls from the individual post editor screen (Gutenberg and Classic).', 'olympus-google-fonts' ),
|
247 |
)
|
248 |
);
|
249 |
|
@@ -258,14 +260,15 @@ function ogf_customize_register( $wp_customize ) {
|
|
258 |
$wp_customize->add_control(
|
259 |
'ogf_font_display',
|
260 |
array(
|
|
|
|
|
261 |
'type' => 'select',
|
262 |
'section' => 'ogf_debugging',
|
263 |
-
'label' => __( 'Font Display' ),
|
264 |
'choices' => array(
|
265 |
-
'swap' =>
|
266 |
-
'block' =>
|
267 |
-
'fallback' =>
|
268 |
-
'optional' =>
|
269 |
),
|
270 |
)
|
271 |
);
|
@@ -318,6 +321,7 @@ function ogf_customize_register( $wp_customize ) {
|
|
318 |
'section' => 'ogf_font_loading',
|
319 |
'choices' => $new_variants,
|
320 |
'input_attrs' => $input_attrs,
|
|
|
321 |
)
|
322 |
)
|
323 |
);
|
@@ -352,6 +356,7 @@ function ogf_customize_register( $wp_customize ) {
|
|
352 |
array(
|
353 |
'section' => $loc,
|
354 |
'priority' => 120,
|
|
|
355 |
)
|
356 |
)
|
357 |
);
|
63 |
'label' => esc_html__( 'Load Fonts Only', 'olympus-google-fonts' ),
|
64 |
'description' => esc_html__( 'Load fonts but don\'t automatically assign them to an element.', 'olympus-google-fonts' ),
|
65 |
'section' => 'ogf_advanced__css',
|
66 |
+
'type' => 'ogf-typography-multiselect',
|
67 |
)
|
68 |
)
|
69 |
);
|
180 |
'label' => ( isset( $values['label'] ) ? esc_attr( $values['label'] ) : '' ),
|
181 |
'description' => ( isset( $values['description'] ) ? esc_attr( $values['description'] ) : '' ),
|
182 |
'section' => ( isset( $values['section'] ) ? esc_attr( $values['section'] ) : '' ),
|
183 |
+
'type' => 'ogf-typography',
|
184 |
'settings' =>
|
185 |
apply_filters(
|
186 |
'ogf_typography_control_settings',
|
222 |
'force_styles',
|
223 |
array(
|
224 |
'label' => esc_html__( 'Force Styles?', 'olympus-google-fonts' ),
|
225 |
+
'description' => esc_html__( 'If your choices are not displaying correctly, check this box.', 'olympus-google-fonts' ),
|
226 |
'section' => 'ogf_debugging',
|
227 |
'settings' => 'ogf_force_styles',
|
228 |
'type' => 'checkbox',
|
|
|
229 |
)
|
230 |
);
|
231 |
|
242 |
'ogf_disable_post_level_controls',
|
243 |
array(
|
244 |
'label' => esc_html__( 'Disable Editor Controls', 'olympus-google-fonts' ),
|
245 |
+
'description' => esc_html__( 'Remove font controls from the individual post editor screen (Gutenberg and Classic).', 'olympus-google-fonts' ),
|
246 |
'section' => 'ogf_debugging',
|
247 |
'settings' => 'ogf_disable_post_level_controls',
|
248 |
'type' => 'checkbox',
|
|
|
249 |
)
|
250 |
);
|
251 |
|
260 |
$wp_customize->add_control(
|
261 |
'ogf_font_display',
|
262 |
array(
|
263 |
+
'label' => esc_html__( 'Font Display', 'olympus-google-fonts' ),
|
264 |
+
'description' => '<a href="https://fontsplugin.com/google-fonts-font-display-swap/#values">' . esc_html__( 'Learn more →', 'olympus-google-fonts' ) . '</a>',
|
265 |
'type' => 'select',
|
266 |
'section' => 'ogf_debugging',
|
|
|
267 |
'choices' => array(
|
268 |
+
'swap' => esc_html__( 'Swap', 'olympus-google-fonts' ),
|
269 |
+
'block' => esc_html__( 'Block', 'olympus-google-fonts' ),
|
270 |
+
'fallback' => esc_html__( 'Fallback', 'olympus-google-fonts' ),
|
271 |
+
'optional' => esc_html__( 'Optional', 'olympus-google-fonts' ),
|
272 |
),
|
273 |
)
|
274 |
);
|
321 |
'section' => 'ogf_font_loading',
|
322 |
'choices' => $new_variants,
|
323 |
'input_attrs' => $input_attrs,
|
324 |
+
'type' => 'ogf-multiple-checkbox',
|
325 |
)
|
326 |
)
|
327 |
);
|
356 |
array(
|
357 |
'section' => $loc,
|
358 |
'priority' => 120,
|
359 |
+
'type' => 'ogf-upsell',
|
360 |
)
|
361 |
)
|
362 |
);
|
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.1
|
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
@@ -3,14 +3,14 @@ Contributors: DannyCooper, googlefonts, fontsplugin
|
|
3 |
Tags: google, fonts, google fonts, typekit, elementor, adobe fonts, typography, upload fonts, custom fonts, preloading, customizer, font size, font color, design, woocommerce
|
4 |
Donate link: https://fontsplugin.com/#pricing
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 6.
|
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 |
|
12 |
== Description ==
|
13 |
-
The [Google Fonts](https://fontsplugin.com/?utm_source=wporg&utm_medium=readme&utm_campaign=intro) library currently contains
|
14 |
|
15 |
You're not stuck with one font for the entire website, you can easily choose one font for headings and another for your content.
|
16 |
|
3 |
Tags: google, fonts, google fonts, typekit, elementor, adobe fonts, typography, upload fonts, custom fonts, preloading, customizer, font size, font color, design, woocommerce
|
4 |
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.1
|
9 |
|
10 |
The easiest to use Google Fonts Plugin. No coding required. Optimized for Speed. 1000+ font choices.
|
11 |
|
12 |
== Description ==
|
13 |
+
The [Google Fonts](https://fontsplugin.com/?utm_source=wporg&utm_medium=readme&utm_campaign=intro) library currently contains 1455 unique fonts. This plugin allows you to easily use any of them on your WordPress website.
|
14 |
|
15 |
You're not stuck with one font for the entire website, you can easily choose one font for headings and another for your content.
|
16 |
|