Plugin Directory

Changeset 3243818


Ignore:
Timestamp:
02/20/2025 11:12:11 AM (13 months ago)
Author:
DannyCooper
Message:

Update to version 3.9.1 from GitHub

Location:
olympus-google-fonts
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • olympus-google-fonts/tags/3.9.1/changelog.txt

    r3221683 r3243818  
     1= 3.9.1 =
     2
     3* Apply font-weight, font-size and line-height from Customizer to Classic Editor
     4
    15= 3.9.0 =
    26
  • olympus-google-fonts/tags/3.9.1/class-olympus-google-fonts.php

    r3221683 r3243818  
    3939    public function constants() {
    4040        if ( ! defined( 'OGF_VERSION' ) ) {
    41             define( 'OGF_VERSION', '3.9.0' );
     41            define( 'OGF_VERSION', '3.9.1' );
    4242        }
    4343
  • olympus-google-fonts/tags/3.9.1/includes/class-ogf-classic-editor.php

    r3114146 r3243818  
    100100         */
    101101        public function tinymce_custom_options( $opt ) {
    102             $base_type     = get_theme_mod( 'ogf_body_font' );
    103             $headings_type = get_theme_mod( 'ogf_headings_font' );
     102            $base_type             = get_theme_mod( 'ogf_body_font' );
     103            $base_font_size        = get_theme_mod( 'ogf_body_font_size', false );
     104            $base_font_weight      = get_theme_mod( 'ogf_body_font_weight', false );
     105            $base_font_line_height = get_theme_mod( 'ogf_body_line_height', false );
     106
     107            $content_type             = get_theme_mod( 'ogf_post_page_content_font' );
     108            $content_font_size        = get_theme_mod( 'ogf_post_page_content_font_size', false );
     109            $content_font_weight      = get_theme_mod( 'ogf_post_page_content_font_weight', false );
     110            $content_font_line_height = get_theme_mod( 'ogf_post_page_content_line_height', false );
     111
     112            $headings_type        = get_theme_mod( 'ogf_headings_font' );
     113            $headings_font_weight = get_theme_mod( 'ogf_headings_font_weight', false );
    104114
    105115            if ( ogf_is_custom_font( $base_type ) ) {
    106                 $name = str_replace( 'cf-', '', $base_type );
    107                 $font = OGF_Fonts_Taxonomy::get_by_name($name);
     116                $name      = str_replace( 'cf-', '', $base_type );
     117                $font      = OGF_Fonts_Taxonomy::get_by_name( $name );
    108118                $base_type = ! empty( $font['family'] ) ? $font['family'] : $name;
    109119            } elseif ( ogf_is_system_font( $base_type ) ) {
     
    116126            }
    117127
     128            if ( ogf_is_custom_font( $content_type ) ) {
     129                $name         = str_replace( 'cf-', '', $content_type );
     130                $font         = OGF_Fonts_Taxonomy::get_by_name( $name );
     131                $content_type = ! empty( $font['family'] ) ? $font['family'] : $name;
     132            } elseif ( ogf_is_system_font( $content_type ) ) {
     133                $content_type = str_replace( 'sf-', '', $content_type );
     134                $content_type = $this->typekit_fonts[ $content_type ]['stack'] ?? $content_type;
     135            } elseif ( ogf_is_google_font( $content_type ) ) {
     136                $content_type = $this->ogf_fonts->get_font_name( $content_type );
     137            } elseif ( ogf_is_typekit_font( $content_type ) ) {
     138                $content_type = $this->typekit_fonts[ $content_type ]['stack'] ?? $content_type;
     139            }
     140
    118141            if ( ogf_is_custom_font( $headings_type ) ) {
    119                 $name = str_replace( 'cf-', '', $headings_type );
    120                 $font = OGF_Fonts_Taxonomy::get_by_name($name);
     142                $name          = str_replace( 'cf-', '', $headings_type );
     143                $font          = OGF_Fonts_Taxonomy::get_by_name( $name );
    121144                $headings_type = ! empty( $font['family'] ) ? $font['family'] : $name;
    122145            } elseif ( ogf_is_system_font( $headings_type ) ) {
     
    135158            }
    136159
     160            $opt['content_style'] .= 'body#tinymce, body#tinymce p { ';
     161
    137162            if ( $base_type !== 'default' ) {
    138                 $opt['content_style'] .= 'body#tinymce, body#tinymce p { font-family: ' . str_replace( '"', '\'', $base_type ) . ' !important; }';
    139             }
     163                $opt['content_style'] .= ' font-family: ' . str_replace( '"', '\'', $base_type ) . ' !important;';
     164            }
     165            if ( $base_font_size ) {
     166                $opt['content_style'] .= ' font-size: ' . $base_font_size . 'px !important;';
     167            }
     168            if ( $base_font_weight ) {
     169                $opt['content_style'] .= ' font-weight: ' . $base_font_weight . ' !important;';
     170            }
     171            if ( $base_font_line_height ) {
     172                $opt['content_style'] .= ' line-height: ' . $base_font_line_height . ' !important;';
     173            }
     174
     175            if ( $content_type !== 'default' ) {
     176                $opt['content_style'] .= ' font-family: ' . str_replace( '"', '\'', $content_type ) . ' !important;';
     177            }
     178            if ( $content_font_size ) {
     179                $opt['content_style'] .= ' font-size: ' . $content_font_size . 'px !important;';
     180            }
     181            if ( $content_font_weight ) {
     182                $opt['content_style'] .= ' font-weight: ' . $content_font_weight . ' !important;';
     183            }
     184            if ( $content_font_line_height ) {
     185                $opt['content_style'] .= ' line-height: ' . $content_font_line_height . ' !important;';
     186            }
     187
     188            $opt['content_style'] .= '}';
     189
     190            $opt['content_style'] .= '#tinymce h1, #tinymce h2, #tinymce h3, #tinymce h4, #tinymce h5, #tinymce h6 {';
     191
    140192            if ( $headings_type !== 'default' ) {
    141                 $opt['content_style'] .= '#tinymce h1, #tinymce h2, #tinymce h3, #tinymce h4, #tinymce h5, #tinymce h6 { font-family: ' . str_replace( '"', '\'', $headings_type ) . ' !important; }';
    142             }
     193                $opt['content_style'] .= ' font-family: ' . str_replace( '"', '\'', $headings_type ) . ' !important;';
     194            }
     195            if ( $headings_font_weight ) {
     196                $opt['content_style'] .= ' font-weight: ' . $headings_font_weight . ' !important;';
     197            }
     198
     199            $opt['content_style'] .= '}';
    143200
    144201            $opt['content_style'] .= ogf_return_custom_font_css();
  • olympus-google-fonts/tags/3.9.1/olympus-google-fonts.php

    r3221683 r3243818  
    66 * Plugin URI:  https://wordpress.org/plugins/olympus-google-fonts/
    77 * Description: The easiest to customize fonts in WordPress. Optimized for Speed. 1000+ font choices. Supports Google Fonts, Adobe Fonts and Upload Fonts.
    8  * Version:     3.9.0
     8 * Version:     3.9.1
    99 * Author:      Fonts Plugin
    1010 * Author URI:  https://fontsplugin.com/?utm_source=wporg&utm_medium=readme&utm_campaign=description
  • olympus-google-fonts/tags/3.9.1/readme.txt

    r3221683 r3243818  
    66Tested up to: 6.7
    77License: GPLv2 or later
    8 Stable tag: 3.9.0
     8Stable tag: 3.9.1
    99
    1010The easiest to customize fonts in WordPress. Optimized for Speed. 1000+ font choices. Supports Google Fonts, Adobe Fonts and Upload Fonts.
     
    2525* **Live Customizer Preview:** Choose and preview fonts in real time using the WordPress Customizer.
    2626* **Over 1000+ Google Fonts** to choose from.
    27 * **Adobe Fonts (Typekit)** integration.
     27* [**Adobe Fonts (Typekit)** integration.](https://docs.fontsplugin.com/integrations/adobe-fonts)
     28* [**Upload Your Own Fonts.**](https://docs.fontsplugin.com/custom-font-uploads/custom-font-uploads/)
    2829* Works with any WordPress Theme. No coding required.
    2930* Easy One-Click Updates.
     
    3738* Preconnect Resource Hints.
    3839* Host Google Fonts Locally.
    39 * Upload Custom Fonts.
    4040* Font Size, Weight, Color and Line Height Typography Settings.
    4141
     
    4747
    4848Fonts Plugin will work with all WordPress themes and has been specifically tested with the following:
     49
     50#### Plugins
     51
     52* [Elementor](https://docs.fontsplugin.com/integrations/elementor/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
     53* [Divi Builder](https://docs.fontsplugin.com/integrations/divi-builder/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
     54* [Beaver Builder](https://docs.fontsplugin.com/integrations/beaver-builder/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
     55* [WPBakery](https://docs.fontsplugin.com/integrations/wpbakery/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
     56
     57#### Themes
    4958
    5059* All StudioPress and Genesis Themes
     
    6473* [Google Fonts Checker](https://fontsplugin.com/google-fonts-checker/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
    6574* [How to Use Google Fonts in WordPress](https://fontsplugin.com/wordpress-google-fonts/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
    66 * [Google Fonts in Beaver Builder](https://docs.fontsplugin.com/integrations/beaver-builder/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
    67 * [Google Fonts in Elementor](https://docs.fontsplugin.com/integrations/elementor/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
    68 * [Google Fonts in WPBakery](https://docs.fontsplugin.com/integrations/wpbakery/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
    6975
    7076= Bugs =
  • olympus-google-fonts/trunk/changelog.txt

    r3221683 r3243818  
     1= 3.9.1 =
     2
     3* Apply font-weight, font-size and line-height from Customizer to Classic Editor
     4
    15= 3.9.0 =
    26
  • olympus-google-fonts/trunk/class-olympus-google-fonts.php

    r3221683 r3243818  
    3939    public function constants() {
    4040        if ( ! defined( 'OGF_VERSION' ) ) {
    41             define( 'OGF_VERSION', '3.9.0' );
     41            define( 'OGF_VERSION', '3.9.1' );
    4242        }
    4343
  • olympus-google-fonts/trunk/includes/class-ogf-classic-editor.php

    r3114146 r3243818  
    100100         */
    101101        public function tinymce_custom_options( $opt ) {
    102             $base_type     = get_theme_mod( 'ogf_body_font' );
    103             $headings_type = get_theme_mod( 'ogf_headings_font' );
     102            $base_type             = get_theme_mod( 'ogf_body_font' );
     103            $base_font_size        = get_theme_mod( 'ogf_body_font_size', false );
     104            $base_font_weight      = get_theme_mod( 'ogf_body_font_weight', false );
     105            $base_font_line_height = get_theme_mod( 'ogf_body_line_height', false );
     106
     107            $content_type             = get_theme_mod( 'ogf_post_page_content_font' );
     108            $content_font_size        = get_theme_mod( 'ogf_post_page_content_font_size', false );
     109            $content_font_weight      = get_theme_mod( 'ogf_post_page_content_font_weight', false );
     110            $content_font_line_height = get_theme_mod( 'ogf_post_page_content_line_height', false );
     111
     112            $headings_type        = get_theme_mod( 'ogf_headings_font' );
     113            $headings_font_weight = get_theme_mod( 'ogf_headings_font_weight', false );
    104114
    105115            if ( ogf_is_custom_font( $base_type ) ) {
    106                 $name = str_replace( 'cf-', '', $base_type );
    107                 $font = OGF_Fonts_Taxonomy::get_by_name($name);
     116                $name      = str_replace( 'cf-', '', $base_type );
     117                $font      = OGF_Fonts_Taxonomy::get_by_name( $name );
    108118                $base_type = ! empty( $font['family'] ) ? $font['family'] : $name;
    109119            } elseif ( ogf_is_system_font( $base_type ) ) {
     
    116126            }
    117127
     128            if ( ogf_is_custom_font( $content_type ) ) {
     129                $name         = str_replace( 'cf-', '', $content_type );
     130                $font         = OGF_Fonts_Taxonomy::get_by_name( $name );
     131                $content_type = ! empty( $font['family'] ) ? $font['family'] : $name;
     132            } elseif ( ogf_is_system_font( $content_type ) ) {
     133                $content_type = str_replace( 'sf-', '', $content_type );
     134                $content_type = $this->typekit_fonts[ $content_type ]['stack'] ?? $content_type;
     135            } elseif ( ogf_is_google_font( $content_type ) ) {
     136                $content_type = $this->ogf_fonts->get_font_name( $content_type );
     137            } elseif ( ogf_is_typekit_font( $content_type ) ) {
     138                $content_type = $this->typekit_fonts[ $content_type ]['stack'] ?? $content_type;
     139            }
     140
    118141            if ( ogf_is_custom_font( $headings_type ) ) {
    119                 $name = str_replace( 'cf-', '', $headings_type );
    120                 $font = OGF_Fonts_Taxonomy::get_by_name($name);
     142                $name          = str_replace( 'cf-', '', $headings_type );
     143                $font          = OGF_Fonts_Taxonomy::get_by_name( $name );
    121144                $headings_type = ! empty( $font['family'] ) ? $font['family'] : $name;
    122145            } elseif ( ogf_is_system_font( $headings_type ) ) {
     
    135158            }
    136159
     160            $opt['content_style'] .= 'body#tinymce, body#tinymce p { ';
     161
    137162            if ( $base_type !== 'default' ) {
    138                 $opt['content_style'] .= 'body#tinymce, body#tinymce p { font-family: ' . str_replace( '"', '\'', $base_type ) . ' !important; }';
    139             }
     163                $opt['content_style'] .= ' font-family: ' . str_replace( '"', '\'', $base_type ) . ' !important;';
     164            }
     165            if ( $base_font_size ) {
     166                $opt['content_style'] .= ' font-size: ' . $base_font_size . 'px !important;';
     167            }
     168            if ( $base_font_weight ) {
     169                $opt['content_style'] .= ' font-weight: ' . $base_font_weight . ' !important;';
     170            }
     171            if ( $base_font_line_height ) {
     172                $opt['content_style'] .= ' line-height: ' . $base_font_line_height . ' !important;';
     173            }
     174
     175            if ( $content_type !== 'default' ) {
     176                $opt['content_style'] .= ' font-family: ' . str_replace( '"', '\'', $content_type ) . ' !important;';
     177            }
     178            if ( $content_font_size ) {
     179                $opt['content_style'] .= ' font-size: ' . $content_font_size . 'px !important;';
     180            }
     181            if ( $content_font_weight ) {
     182                $opt['content_style'] .= ' font-weight: ' . $content_font_weight . ' !important;';
     183            }
     184            if ( $content_font_line_height ) {
     185                $opt['content_style'] .= ' line-height: ' . $content_font_line_height . ' !important;';
     186            }
     187
     188            $opt['content_style'] .= '}';
     189
     190            $opt['content_style'] .= '#tinymce h1, #tinymce h2, #tinymce h3, #tinymce h4, #tinymce h5, #tinymce h6 {';
     191
    140192            if ( $headings_type !== 'default' ) {
    141                 $opt['content_style'] .= '#tinymce h1, #tinymce h2, #tinymce h3, #tinymce h4, #tinymce h5, #tinymce h6 { font-family: ' . str_replace( '"', '\'', $headings_type ) . ' !important; }';
    142             }
     193                $opt['content_style'] .= ' font-family: ' . str_replace( '"', '\'', $headings_type ) . ' !important;';
     194            }
     195            if ( $headings_font_weight ) {
     196                $opt['content_style'] .= ' font-weight: ' . $headings_font_weight . ' !important;';
     197            }
     198
     199            $opt['content_style'] .= '}';
    143200
    144201            $opt['content_style'] .= ogf_return_custom_font_css();
  • olympus-google-fonts/trunk/olympus-google-fonts.php

    r3221683 r3243818  
    66 * Plugin URI:  https://wordpress.org/plugins/olympus-google-fonts/
    77 * Description: The easiest to customize fonts in WordPress. Optimized for Speed. 1000+ font choices. Supports Google Fonts, Adobe Fonts and Upload Fonts.
    8  * Version:     3.9.0
     8 * Version:     3.9.1
    99 * Author:      Fonts Plugin
    1010 * Author URI:  https://fontsplugin.com/?utm_source=wporg&utm_medium=readme&utm_campaign=description
  • olympus-google-fonts/trunk/readme.txt

    r3221683 r3243818  
    66Tested up to: 6.7
    77License: GPLv2 or later
    8 Stable tag: 3.9.0
     8Stable tag: 3.9.1
    99
    1010The easiest to customize fonts in WordPress. Optimized for Speed. 1000+ font choices. Supports Google Fonts, Adobe Fonts and Upload Fonts.
     
    2525* **Live Customizer Preview:** Choose and preview fonts in real time using the WordPress Customizer.
    2626* **Over 1000+ Google Fonts** to choose from.
    27 * **Adobe Fonts (Typekit)** integration.
     27* [**Adobe Fonts (Typekit)** integration.](https://docs.fontsplugin.com/integrations/adobe-fonts)
     28* [**Upload Your Own Fonts.**](https://docs.fontsplugin.com/custom-font-uploads/custom-font-uploads/)
    2829* Works with any WordPress Theme. No coding required.
    2930* Easy One-Click Updates.
     
    3738* Preconnect Resource Hints.
    3839* Host Google Fonts Locally.
    39 * Upload Custom Fonts.
    4040* Font Size, Weight, Color and Line Height Typography Settings.
    4141
     
    4747
    4848Fonts Plugin will work with all WordPress themes and has been specifically tested with the following:
     49
     50#### Plugins
     51
     52* [Elementor](https://docs.fontsplugin.com/integrations/elementor/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
     53* [Divi Builder](https://docs.fontsplugin.com/integrations/divi-builder/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
     54* [Beaver Builder](https://docs.fontsplugin.com/integrations/beaver-builder/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
     55* [WPBakery](https://docs.fontsplugin.com/integrations/wpbakery/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
     56
     57#### Themes
    4958
    5059* All StudioPress and Genesis Themes
     
    6473* [Google Fonts Checker](https://fontsplugin.com/google-fonts-checker/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
    6574* [How to Use Google Fonts in WordPress](https://fontsplugin.com/wordpress-google-fonts/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
    66 * [Google Fonts in Beaver Builder](https://docs.fontsplugin.com/integrations/beaver-builder/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
    67 * [Google Fonts in Elementor](https://docs.fontsplugin.com/integrations/elementor/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
    68 * [Google Fonts in WPBakery](https://docs.fontsplugin.com/integrations/wpbakery/?utm_source=wporg&utm_medium=readme&utm_campaign=docs)
    6975
    7076= Bugs =
Note: See TracChangeset for help on using the changeset viewer.