Changeset 3254070
- Timestamp:
- 03/11/2025 01:07:58 PM (11 months ago)
- Location:
- olympus-google-fonts
- Files:
-
- 22 edited
- 1 copied
-
tags/3.9.2 (copied) (copied from olympus-google-fonts/trunk)
-
tags/3.9.2/assets/css/customize-controls.css (modified) (2 diffs)
-
tags/3.9.2/assets/js/customize-controls.js (modified) (1 diff)
-
tags/3.9.2/changelog.txt (modified) (1 diff)
-
tags/3.9.2/class-olympus-google-fonts.php (modified) (1 diff)
-
tags/3.9.2/compatibility/elementor.php (modified) (1 diff)
-
tags/3.9.2/includes/customizer/output-css.php (modified) (2 diffs)
-
tags/3.9.2/includes/customizer/panels.php (modified) (2 diffs)
-
tags/3.9.2/includes/functions.php (modified) (2 diffs)
-
tags/3.9.2/includes/gutenberg/output-css.php (modified) (1 diff)
-
tags/3.9.2/olympus-google-fonts.php (modified) (1 diff)
-
tags/3.9.2/readme.txt (modified) (1 diff)
-
trunk/assets/css/customize-controls.css (modified) (2 diffs)
-
trunk/assets/js/customize-controls.js (modified) (1 diff)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/class-olympus-google-fonts.php (modified) (1 diff)
-
trunk/compatibility/elementor.php (modified) (1 diff)
-
trunk/includes/customizer/output-css.php (modified) (2 diffs)
-
trunk/includes/customizer/panels.php (modified) (2 diffs)
-
trunk/includes/functions.php (modified) (2 diffs)
-
trunk/includes/gutenberg/output-css.php (modified) (1 diff)
-
trunk/olympus-google-fonts.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
olympus-google-fonts/tags/3.9.2/assets/css/customize-controls.css
r2801985 r3254070 7 7 #customize-theme-controls #sub-accordion-section-ogf_theme, 8 8 #customize-theme-controls #sub-accordion-section-ogf_woocommerce, 9 #customize-theme-controls #sub-accordion-section-ogf_elementor, 9 10 #customize-theme-controls #sub-accordion-section-ogf_wc_shop, 10 11 #customize-theme-controls #sub-accordion-section-ogf_wc_single, … … 28 29 29 30 #customize-control-ogf_headings_typography .typography-font-size, 30 #customize-control-ogf_headings_typography .typography-line-height { 31 #customize-control-ogf_headings_typography .typography-line-height, 32 #customize-control-ogf_elementor_heading_typography .typography-font-size, 33 #customize-control-ogf_elementor_heading_typography .typography-line-height { 31 34 display: none; 32 35 } -
olympus-google-fonts/tags/3.9.2/assets/js/customize-controls.js
r3100693 r3254070 237 237 238 238 // Make sure our manual input value doesn't exceed the minimum & maxmium values 239 if ( resetValue < sliderMinValue ) {239 if ( resetValue && resetValue < sliderMinValue ) { 240 240 resetValue = sliderMinValue; 241 241 jQuery( this ).val( resetValue ); 242 242 } 243 if ( resetValue > sliderMaxValue ) {243 if ( resetValue && resetValue > sliderMaxValue ) { 244 244 resetValue = sliderMaxValue; 245 245 jQuery( this ).val( resetValue ); 246 246 } 247 247 248 jQuery( this ).parent().find( '.slider' ).slider( 'value', resetValue ); 248 249 } ); -
olympus-google-fonts/tags/3.9.2/changelog.txt
r3243818 r3254070 1 = 3.9.2 = 2 3 * Add control panel for Elementor (headings/buttons) 4 1 5 = 3.9.1 = 2 6 -
olympus-google-fonts/tags/3.9.2/class-olympus-google-fonts.php
r3243818 r3254070 39 39 public function constants() { 40 40 if ( ! defined( 'OGF_VERSION' ) ) { 41 define( 'OGF_VERSION', '3.9. 1' );41 define( 'OGF_VERSION', '3.9.2' ); 42 42 } 43 43 -
olympus-google-fonts/tags/3.9.2/compatibility/elementor.php
r3221683 r3254070 11 11 * Create a new group for fonts added by Fonts Plugin. 12 12 */ 13 add_filter( 'elementor/fonts/groups', function($groups) { 14 return array_merge(['fontsplugin' => 'Fonts Plugin'], $groups); 15 }, 10, 1 ); 13 add_filter( 14 'elementor/fonts/groups', 15 function ( $groups ) { 16 return array_merge( array( 'fontsplugin' => 'Fonts Plugin' ), $groups ); 17 }, 18 10, 19 1 20 ); 16 21 17 22 /** 18 23 * Add fonts from Typekit and uploaded fonts to the Elementor dropdown. 19 24 */ 20 add_filter( 'elementor/fonts/additional_fonts', function($fonts) { 21 $custom_fonts = ogf_custom_fonts_unique(); 22 23 foreach( $custom_fonts as $key => $value ) { 24 $fonts[$key] = 'fontsplugin'; 25 } 25 add_filter( 26 'elementor/fonts/additional_fonts', 27 function ( $fonts ) { 28 $custom_fonts = ogf_custom_fonts_unique(); 26 29 27 $typekit_fonts = ogf_typekit_fonts(); 30 foreach ( $custom_fonts as $key => $value ) { 31 $fonts[ $key ] = 'fontsplugin'; 32 } 28 33 29 foreach( $typekit_fonts as $key => $value ) { 30 $fonts[$value['id']] = 'fontsplugin'; 31 } 34 $typekit_fonts = ogf_typekit_fonts(); 32 35 33 return $fonts; 34 }, 10, 1 ); 36 foreach ( $typekit_fonts as $key => $value ) { 37 $fonts[ $value['id'] ] = 'fontsplugin'; 38 } 39 40 return $fonts; 41 }, 42 10, 43 1 44 ); 45 46 /** 47 * Modify the default element selectors to improve compatibility with Elementor. 48 * 49 * @param array $elements The default elements. 50 */ 51 function ogf_elementor_controls( $elements ) { 52 $new = array( 53 'ogf_elementor_heading' => array( 54 'label' => esc_html__( 'Elementor Heading Typography', 'olympus-google-fonts' ), 55 'description' => '', 56 'section' => 'ogf_elementor', 57 'selectors' => '.elementor-page .elementor-heading-title', 58 ), 59 'ogf_elementor_button' => array( 60 'label' => esc_html__( 'Elementor Button Typography', 'olympus-google-fonts' ), 61 'description' => '', 62 'section' => 'ogf_elementor', 63 'selectors' => '.elementor-page .elementor-button-link', 64 ), 65 ); 66 67 return array_merge( $elements, $new ); 68 } 69 add_filter( 'ogf_elements', 'ogf_elementor_controls' ); -
olympus-google-fonts/tags/3.9.2/includes/customizer/output-css.php
r3221683 r3254070 205 205 function ogf_build_font_stack( $font_id ) { 206 206 207 // Try to get cached font stack first. 208 $cache_key = 'ogf_font_stack_' . md5( $font_id ); 209 $cached_stack = wp_cache_get( $cache_key ); 210 211 if ( $cached_stack !== false ) { 212 return $cached_stack; 213 } 214 215 // Initialize stack. 207 216 $stack = ''; 208 217 … … 240 249 } 241 250 251 // Cache the result. 252 wp_cache_set( $cache_key, $stack, 'ogf_font_stacks', HOUR_IN_SECONDS ); 253 254 // Allow filtering of the final stack. 242 255 return apply_filters( "ogf_{$font_id}_stack", $stack ); 243 256 } -
olympus-google-fonts/tags/3.9.2/includes/customizer/panels.php
r3114877 r3254070 213 213 } 214 214 215 if ( ogf_is_ memberpress_courses_activated() ) {215 if ( ogf_is_elementor_activated() ) { 216 216 $ogf_memberspress_courses_panel = new OGF_Customize_Panel( 217 217 $wp_customize, … … 226 226 227 227 $wp_customize->add_section( 228 'ogf_ memberpress_courses',228 'ogf_elementor', 229 229 array( 230 230 'title' => esc_html__( 'MemberPress Courses', 'olympus-google-fonts' ), 231 231 'panel' => 'ogf_memberpress', 232 ) 233 ); 234 } 235 236 if ( ogf_is_elementor_activated() ) { 237 238 $wp_customize->add_section( 239 'ogf_elementor', 240 array( 241 'title' => esc_html__( 'Elementor', 'olympus-google-fonts' ), 242 'description' => __( 'These styles only apply to elements added using the Elementor plugin.', 'olympus-google-fonts' ), 243 'panel' => 'ogf_google_fonts', 232 244 ) 233 245 ); -
olympus-google-fonts/tags/3.9.2/includes/functions.php
r3115036 r3254070 161 161 */ 162 162 function ogf_fonts_array() { 163 $fonts = array(); 163 static $fonts = array(); 164 165 if ( ! empty( $fonts ) ) { 166 return $fonts; 167 } 164 168 165 169 $fonts_json = file_get_contents( OGF_DIR_PATH . '/blocks/src/google-fonts/fonts.json' ); … … 432 436 433 437 /** 438 * Check if MemberPress Courses is activated. 439 */ 440 function ogf_is_elementor_activated() { 441 if ( defined( 'ELEMENTOR_VERSION' ) ) { 442 return true; 443 } 444 return false; 445 } 446 447 /** 434 448 * Check if Fonts Plugin Pro is activated. 435 449 */ -
olympus-google-fonts/tags/3.9.2/includes/gutenberg/output-css.php
r3100693 r3254070 44 44 add_action( 'admin_head', 'ogf_gutenberg_output_css' ); 45 45 46 /** 47 * Build the CSS rules for the Gutenberg editor. 48 * 49 * @return string The compiled CSS rules. 50 */ 46 51 function ogf_gutenberg_build_css() { 47 52 $elements = array( -
olympus-google-fonts/tags/3.9.2/olympus-google-fonts.php
r3243818 r3254070 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. 18 * Version: 3.9.2 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.2/readme.txt
r3243818 r3254070 6 6 Tested up to: 6.7 7 7 License: GPLv2 or later 8 Stable tag: 3.9. 18 Stable tag: 3.9.2 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. -
olympus-google-fonts/trunk/assets/css/customize-controls.css
r2801985 r3254070 7 7 #customize-theme-controls #sub-accordion-section-ogf_theme, 8 8 #customize-theme-controls #sub-accordion-section-ogf_woocommerce, 9 #customize-theme-controls #sub-accordion-section-ogf_elementor, 9 10 #customize-theme-controls #sub-accordion-section-ogf_wc_shop, 10 11 #customize-theme-controls #sub-accordion-section-ogf_wc_single, … … 28 29 29 30 #customize-control-ogf_headings_typography .typography-font-size, 30 #customize-control-ogf_headings_typography .typography-line-height { 31 #customize-control-ogf_headings_typography .typography-line-height, 32 #customize-control-ogf_elementor_heading_typography .typography-font-size, 33 #customize-control-ogf_elementor_heading_typography .typography-line-height { 31 34 display: none; 32 35 } -
olympus-google-fonts/trunk/assets/js/customize-controls.js
r3100693 r3254070 237 237 238 238 // Make sure our manual input value doesn't exceed the minimum & maxmium values 239 if ( resetValue < sliderMinValue ) {239 if ( resetValue && resetValue < sliderMinValue ) { 240 240 resetValue = sliderMinValue; 241 241 jQuery( this ).val( resetValue ); 242 242 } 243 if ( resetValue > sliderMaxValue ) {243 if ( resetValue && resetValue > sliderMaxValue ) { 244 244 resetValue = sliderMaxValue; 245 245 jQuery( this ).val( resetValue ); 246 246 } 247 247 248 jQuery( this ).parent().find( '.slider' ).slider( 'value', resetValue ); 248 249 } ); -
olympus-google-fonts/trunk/changelog.txt
r3243818 r3254070 1 = 3.9.2 = 2 3 * Add control panel for Elementor (headings/buttons) 4 1 5 = 3.9.1 = 2 6 -
olympus-google-fonts/trunk/class-olympus-google-fonts.php
r3243818 r3254070 39 39 public function constants() { 40 40 if ( ! defined( 'OGF_VERSION' ) ) { 41 define( 'OGF_VERSION', '3.9. 1' );41 define( 'OGF_VERSION', '3.9.2' ); 42 42 } 43 43 -
olympus-google-fonts/trunk/compatibility/elementor.php
r3221683 r3254070 11 11 * Create a new group for fonts added by Fonts Plugin. 12 12 */ 13 add_filter( 'elementor/fonts/groups', function($groups) { 14 return array_merge(['fontsplugin' => 'Fonts Plugin'], $groups); 15 }, 10, 1 ); 13 add_filter( 14 'elementor/fonts/groups', 15 function ( $groups ) { 16 return array_merge( array( 'fontsplugin' => 'Fonts Plugin' ), $groups ); 17 }, 18 10, 19 1 20 ); 16 21 17 22 /** 18 23 * Add fonts from Typekit and uploaded fonts to the Elementor dropdown. 19 24 */ 20 add_filter( 'elementor/fonts/additional_fonts', function($fonts) { 21 $custom_fonts = ogf_custom_fonts_unique(); 22 23 foreach( $custom_fonts as $key => $value ) { 24 $fonts[$key] = 'fontsplugin'; 25 } 25 add_filter( 26 'elementor/fonts/additional_fonts', 27 function ( $fonts ) { 28 $custom_fonts = ogf_custom_fonts_unique(); 26 29 27 $typekit_fonts = ogf_typekit_fonts(); 30 foreach ( $custom_fonts as $key => $value ) { 31 $fonts[ $key ] = 'fontsplugin'; 32 } 28 33 29 foreach( $typekit_fonts as $key => $value ) { 30 $fonts[$value['id']] = 'fontsplugin'; 31 } 34 $typekit_fonts = ogf_typekit_fonts(); 32 35 33 return $fonts; 34 }, 10, 1 ); 36 foreach ( $typekit_fonts as $key => $value ) { 37 $fonts[ $value['id'] ] = 'fontsplugin'; 38 } 39 40 return $fonts; 41 }, 42 10, 43 1 44 ); 45 46 /** 47 * Modify the default element selectors to improve compatibility with Elementor. 48 * 49 * @param array $elements The default elements. 50 */ 51 function ogf_elementor_controls( $elements ) { 52 $new = array( 53 'ogf_elementor_heading' => array( 54 'label' => esc_html__( 'Elementor Heading Typography', 'olympus-google-fonts' ), 55 'description' => '', 56 'section' => 'ogf_elementor', 57 'selectors' => '.elementor-page .elementor-heading-title', 58 ), 59 'ogf_elementor_button' => array( 60 'label' => esc_html__( 'Elementor Button Typography', 'olympus-google-fonts' ), 61 'description' => '', 62 'section' => 'ogf_elementor', 63 'selectors' => '.elementor-page .elementor-button-link', 64 ), 65 ); 66 67 return array_merge( $elements, $new ); 68 } 69 add_filter( 'ogf_elements', 'ogf_elementor_controls' ); -
olympus-google-fonts/trunk/includes/customizer/output-css.php
r3221683 r3254070 205 205 function ogf_build_font_stack( $font_id ) { 206 206 207 // Try to get cached font stack first. 208 $cache_key = 'ogf_font_stack_' . md5( $font_id ); 209 $cached_stack = wp_cache_get( $cache_key ); 210 211 if ( $cached_stack !== false ) { 212 return $cached_stack; 213 } 214 215 // Initialize stack. 207 216 $stack = ''; 208 217 … … 240 249 } 241 250 251 // Cache the result. 252 wp_cache_set( $cache_key, $stack, 'ogf_font_stacks', HOUR_IN_SECONDS ); 253 254 // Allow filtering of the final stack. 242 255 return apply_filters( "ogf_{$font_id}_stack", $stack ); 243 256 } -
olympus-google-fonts/trunk/includes/customizer/panels.php
r3114877 r3254070 213 213 } 214 214 215 if ( ogf_is_ memberpress_courses_activated() ) {215 if ( ogf_is_elementor_activated() ) { 216 216 $ogf_memberspress_courses_panel = new OGF_Customize_Panel( 217 217 $wp_customize, … … 226 226 227 227 $wp_customize->add_section( 228 'ogf_ memberpress_courses',228 'ogf_elementor', 229 229 array( 230 230 'title' => esc_html__( 'MemberPress Courses', 'olympus-google-fonts' ), 231 231 'panel' => 'ogf_memberpress', 232 ) 233 ); 234 } 235 236 if ( ogf_is_elementor_activated() ) { 237 238 $wp_customize->add_section( 239 'ogf_elementor', 240 array( 241 'title' => esc_html__( 'Elementor', 'olympus-google-fonts' ), 242 'description' => __( 'These styles only apply to elements added using the Elementor plugin.', 'olympus-google-fonts' ), 243 'panel' => 'ogf_google_fonts', 232 244 ) 233 245 ); -
olympus-google-fonts/trunk/includes/functions.php
r3115036 r3254070 161 161 */ 162 162 function ogf_fonts_array() { 163 $fonts = array(); 163 static $fonts = array(); 164 165 if ( ! empty( $fonts ) ) { 166 return $fonts; 167 } 164 168 165 169 $fonts_json = file_get_contents( OGF_DIR_PATH . '/blocks/src/google-fonts/fonts.json' ); … … 432 436 433 437 /** 438 * Check if MemberPress Courses is activated. 439 */ 440 function ogf_is_elementor_activated() { 441 if ( defined( 'ELEMENTOR_VERSION' ) ) { 442 return true; 443 } 444 return false; 445 } 446 447 /** 434 448 * Check if Fonts Plugin Pro is activated. 435 449 */ -
olympus-google-fonts/trunk/includes/gutenberg/output-css.php
r3100693 r3254070 44 44 add_action( 'admin_head', 'ogf_gutenberg_output_css' ); 45 45 46 /** 47 * Build the CSS rules for the Gutenberg editor. 48 * 49 * @return string The compiled CSS rules. 50 */ 46 51 function ogf_gutenberg_build_css() { 47 52 $elements = array( -
olympus-google-fonts/trunk/olympus-google-fonts.php
r3243818 r3254070 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. 18 * Version: 3.9.2 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
r3243818 r3254070 6 6 Tested up to: 6.7 7 7 License: GPLv2 or later 8 Stable tag: 3.9. 18 Stable tag: 3.9.2 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.
Note: See TracChangeset
for help on using the changeset viewer.