Changeset 3243818
- Timestamp:
- 02/20/2025 11:12:11 AM (13 months ago)
- Location:
- olympus-google-fonts
- Files:
-
- 10 edited
- 1 copied
-
tags/3.9.1 (copied) (copied from olympus-google-fonts/trunk)
-
tags/3.9.1/changelog.txt (modified) (1 diff)
-
tags/3.9.1/class-olympus-google-fonts.php (modified) (1 diff)
-
tags/3.9.1/includes/class-ogf-classic-editor.php (modified) (3 diffs)
-
tags/3.9.1/olympus-google-fonts.php (modified) (1 diff)
-
tags/3.9.1/readme.txt (modified) (5 diffs)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/class-olympus-google-fonts.php (modified) (1 diff)
-
trunk/includes/class-ogf-classic-editor.php (modified) (3 diffs)
-
trunk/olympus-google-fonts.php (modified) (1 diff)
-
trunk/readme.txt (modified) (5 diffs)
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 1 5 = 3.9.0 = 2 6 -
olympus-google-fonts/tags/3.9.1/class-olympus-google-fonts.php
r3221683 r3243818 39 39 public function constants() { 40 40 if ( ! defined( 'OGF_VERSION' ) ) { 41 define( 'OGF_VERSION', '3.9. 0' );41 define( 'OGF_VERSION', '3.9.1' ); 42 42 } 43 43 -
olympus-google-fonts/tags/3.9.1/includes/class-ogf-classic-editor.php
r3114146 r3243818 100 100 */ 101 101 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 ); 104 114 105 115 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 ); 108 118 $base_type = ! empty( $font['family'] ) ? $font['family'] : $name; 109 119 } elseif ( ogf_is_system_font( $base_type ) ) { … … 116 126 } 117 127 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 118 141 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 ); 121 144 $headings_type = ! empty( $font['family'] ) ? $font['family'] : $name; 122 145 } elseif ( ogf_is_system_font( $headings_type ) ) { … … 135 158 } 136 159 160 $opt['content_style'] .= 'body#tinymce, body#tinymce p { '; 161 137 162 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 140 192 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'] .= '}'; 143 200 144 201 $opt['content_style'] .= ogf_return_custom_font_css(); -
olympus-google-fonts/tags/3.9.1/olympus-google-fonts.php
r3221683 r3243818 6 6 * Plugin URI: https://wordpress.org/plugins/olympus-google-fonts/ 7 7 * 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. 08 * Version: 3.9.1 9 9 * Author: Fonts Plugin 10 10 * 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 6 6 Tested up to: 6.7 7 7 License: GPLv2 or later 8 Stable tag: 3.9. 08 Stable tag: 3.9.1 9 9 10 10 The easiest to customize fonts in WordPress. Optimized for Speed. 1000+ font choices. Supports Google Fonts, Adobe Fonts and Upload Fonts. … … 25 25 * **Live Customizer Preview:** Choose and preview fonts in real time using the WordPress Customizer. 26 26 * **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/) 28 29 * Works with any WordPress Theme. No coding required. 29 30 * Easy One-Click Updates. … … 37 38 * Preconnect Resource Hints. 38 39 * Host Google Fonts Locally. 39 * Upload Custom Fonts.40 40 * Font Size, Weight, Color and Line Height Typography Settings. 41 41 … … 47 47 48 48 Fonts 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 49 58 50 59 * All StudioPress and Genesis Themes … … 64 73 * [Google Fonts Checker](https://fontsplugin.com/google-fonts-checker/?utm_source=wporg&utm_medium=readme&utm_campaign=docs) 65 74 * [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)69 75 70 76 = 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 1 5 = 3.9.0 = 2 6 -
olympus-google-fonts/trunk/class-olympus-google-fonts.php
r3221683 r3243818 39 39 public function constants() { 40 40 if ( ! defined( 'OGF_VERSION' ) ) { 41 define( 'OGF_VERSION', '3.9. 0' );41 define( 'OGF_VERSION', '3.9.1' ); 42 42 } 43 43 -
olympus-google-fonts/trunk/includes/class-ogf-classic-editor.php
r3114146 r3243818 100 100 */ 101 101 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 ); 104 114 105 115 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 ); 108 118 $base_type = ! empty( $font['family'] ) ? $font['family'] : $name; 109 119 } elseif ( ogf_is_system_font( $base_type ) ) { … … 116 126 } 117 127 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 118 141 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 ); 121 144 $headings_type = ! empty( $font['family'] ) ? $font['family'] : $name; 122 145 } elseif ( ogf_is_system_font( $headings_type ) ) { … … 135 158 } 136 159 160 $opt['content_style'] .= 'body#tinymce, body#tinymce p { '; 161 137 162 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 140 192 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'] .= '}'; 143 200 144 201 $opt['content_style'] .= ogf_return_custom_font_css(); -
olympus-google-fonts/trunk/olympus-google-fonts.php
r3221683 r3243818 6 6 * Plugin URI: https://wordpress.org/plugins/olympus-google-fonts/ 7 7 * 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. 08 * Version: 3.9.1 9 9 * Author: Fonts Plugin 10 10 * Author URI: https://fontsplugin.com/?utm_source=wporg&utm_medium=readme&utm_campaign=description -
olympus-google-fonts/trunk/readme.txt
r3221683 r3243818 6 6 Tested up to: 6.7 7 7 License: GPLv2 or later 8 Stable tag: 3.9. 08 Stable tag: 3.9.1 9 9 10 10 The easiest to customize fonts in WordPress. Optimized for Speed. 1000+ font choices. Supports Google Fonts, Adobe Fonts and Upload Fonts. … … 25 25 * **Live Customizer Preview:** Choose and preview fonts in real time using the WordPress Customizer. 26 26 * **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/) 28 29 * Works with any WordPress Theme. No coding required. 29 30 * Easy One-Click Updates. … … 37 38 * Preconnect Resource Hints. 38 39 * Host Google Fonts Locally. 39 * Upload Custom Fonts.40 40 * Font Size, Weight, Color and Line Height Typography Settings. 41 41 … … 47 47 48 48 Fonts 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 49 58 50 59 * All StudioPress and Genesis Themes … … 64 73 * [Google Fonts Checker](https://fontsplugin.com/google-fonts-checker/?utm_source=wporg&utm_medium=readme&utm_campaign=docs) 65 74 * [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)69 75 70 76 = Bugs =
Note: See TracChangeset
for help on using the changeset viewer.