/** * Load our special font CSS file. * * @since Twenty Twelve 1.2 * * @return void */ function staffportal_custom_header_fonts() { $font_url = staffportal_get_font_url(); if (!empty($font_url)) { wp_enqueue_style('staffportal-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 staffportal_get_font_url() To get the Google Font stylesheet URL. * * @since Twenty Twelve 1.2 * * @param string $mce_css CSS path to load in TinyMCE. * @return string Filtered CSS path. */ function staffportal_mce_css($mce_css) { $font_url = staffportal_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; }