Beispiel #1
0
/**
 *
 * Load our special font CSS file.
 *
 *
 *
 * @since JV Allinone 1.2
 *
 */
function allinone_custom_header_fonts()
{
    $font_url = allinone_get_font_url();
    if (!empty($font_url)) {
        wp_enqueue_style('Allinone-fonts', esc_url_raw($font_url), array(), null);
    }
}
Beispiel #2
0
/**
 * Filter TinyMCE CSS path to include Google Fonts.
 *
 * Adds additional stylesheets to the TinyMCE editor if needed.
 *
 * @uses allinone_get_font_url() To get the Google Font stylesheet URL.
 *
 * @since JV Allinone 1.2
 *
 * @param string $mce_css CSS path to load in TinyMCE.
 * @return string Filtered CSS path.
 */
function allinone_mce_css($mce_css)
{
    $font_url = allinone_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;
}