(}z aTNƽ75B 8}z Pخ২75B H}z x4{85B X}z Ŭ|IDX85B h}z ;z1}85B x}z -/]9D85B }z I.\-(95B }z L$h텮p95B }z 2ǫ"r95B }z rM$\95B Ⱥ}z Ͼ00:5B غ}z 5"JԖx:5B }z ٹ:5B }z П6;5B }z `X{P;5B }z Rֈ#B (}z ±Cw#B 8}z #B H}z R 0#B X}z w5ks#B h}z VN$\;5B x}z c_p"B }z BlR"B }z p0kAr"B }z uce "B }z /&$ 8"B Ȼ}z {% "B ػ}z Κ`"B C 0 9{ C 1 (9{ XC 2 89{ C 3 H9{ ȖC 4 X9{ C 5 h9{ 8C 6 x9{ pC 7 9{ C 8 9{ C 9 9{ C : 9{ C ; 9{ C < 9{ C = 9{ `C I 9{ ȌC J 9{ C K 9{ 8C L 9{ pC M 9{ C N 9{ C O 9{ C P 9{ C Q (9{ C R 89{ C S H9{ C T X9{ xC U h9{ C B x9{ xC C 9{ C D 9{ XC E 9{ C F 9{ ȒC G 9{ C H 9{ 8C I 9{ pC J 9{ (}z aTNƽ75B 8}z Pخ২75B H}z x4{85B X}z Ŭ|IDX85B h}z ;z1}85B x}z -/]9D85B }z I.\-(95B }z L$h텮p95B }z 2ǫ"r95B }z rM$\95B ȼ}z Ͼ00:5B ؼ}z 5"JԖx:5B }z ٹ:5B }z П6;5B }z `X{P;5B }z Rֈ#B (}z ±Cw#B 8}z #B H}z R 0#B X}z w5ks#B h}z VN$\;5B x}z c_p"B }z BlR"B }z p0kAr"B }z uce "B }z /&$ 8"B Ƚ}z {% "B ؽ}z Κ`"B pC w x9{ C x 9{ C y 9{ C z 9{ PC { 9{ C | 9{ C } 9{ @C ~ 9{ xC 9{ C :{ C :{ C ( :{ XC 8 :{ C H :{ ȖC X :{ C h :{ 8C x :{ pC :{ C :{ C :{ ic' => __( '900 Italic', 'inspiro' ), ); } return apply_filters( 'inspiro/font-weight', self::$font_weight ); } /** * Get font weight for selected Font Family passed by setting key * * @param string $setting_key The setting key name for Font Family control. * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager. * @return array */ public static function get_font_family_weight( $setting_key, $wp_customize ) { $font_family_weight = array( '' => __( 'Inherit', 'inspiro' ), ); if ( ! is_object( $wp_customize->get_setting( $setting_key ) ) ) { return $font_family_weight; } $default = $wp_customize->get_setting( $setting_key )->default; $select_font_family = get_theme_mod( $setting_key, $default ); $font_family = self::clean_google_fonts( $select_font_family ); $all_font_weight = self::get_all_font_weight(); if ( isset( self::$google_fonts[ $font_family ][0] ) && is_array( self::$google_fonts[ $font_family ][0] ) ) { foreach ( self::$google_fonts[ $font_family ][0] as $font_weight ) { // Skip font variants (italic, i). if ( strpos( $font_weight, 'italic' ) === false || strpos( $font_weight, 'i' ) === false ) { $font_family_weight[ $font_weight ] = $all_font_weight[ $font_weight ]; } } } return $font_family_weight; } /** * Get font presets * * @return array Array of all font presets for Inspiro theme */ public static function get_font_presets() { if ( empty( self::$font_presets ) ) { self::$font_presets = array( array( 'name' => 'Default', 'image' => 'system.png', 'mods' => array( 'body-font-family' => '', 'body-font-size' => '16', 'body-font-weight' => '400', 'body-text-transform' => '', 'body-line-height' => '1.8', // TODO: add all settings here. ), ), ); // TODO: add font presets. } return apply_filters( 'inspiro/font-presets', self::$font_presets ); } /** * Clean font name. * * Google Fonts are saved as {'Font Name', Category}. This function cleanes this up to retreive only the {Font Name}. * * @since 1.3.0 * @param string $font_value Name of the font. * * @return string Font name where commas and inverted commas are removed if the font is a Google Font. */ public static function clean_google_fonts( $font_value ) { // Bail if fontVAlue does not contain a comma. if ( strpos( $font_value, ',' ) === false ) { return $font_value; } $split_font = explode( ',', $font_value ); $google_font_value = str_replace( "'", '', $split_font[0] ); // Check if the cleaned font exists in the Google fonts array. $google_fonts = self::get_google_fonts(); if ( isset( $google_fonts[ $google_font_value ] ) ) { $font_value = $google_font_value; } return $font_value; } } }