/** * Load our special font CSS file. * * @since Flexy 1.0 */ function flexy_custom_header_fonts() { $font_url = flexy_get_font_url(); if (!empty($font_url)) { wp_enqueue_style('flexy-fonts', esc_url_raw($font_url), array(), null); } }
/** * Filter TinyMCE CSS path to include Google Fonts. * * Adds additional stylesheets to the TinyMCE editor if needed. * * @uses flexy_get_font_url() To get the Google Font stylesheet URL. * * @since Flexy 1.2 * * @param string $mce_css CSS path to load in TinyMCE. * @return string Filtered CSS path. */ function flexy_mce_css($mce_css) { $font_url = flexy_get_font_url(); if (empty($font_url)) { return $mce_css; } if (!empty($mce_css)) { $mce_css .= ','; } $mce_css .= esc_url_raw(str_replace(',', '%2C', $font_url)); return $mce_css; }