コード例 #1
0
ファイル: mce.php プロジェクト: honeymustard/teaberry
/**
 * filter mce css path to include google fonts
 */
function teaberry_mce_css($mce_css)
{
    $font_url = teaberry_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;
}
コード例 #2
0
ファイル: styles.php プロジェクト: honeymustard/teaberry
/**
 * enqueue scripts and styles for front-end
 */
function teaberry_scripts_styles()
{
    global $wp_styles;
    /* adds JavaScript to pages with the comment form */
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    $font = teaberry_get_font_url();
    if (!empty($font)) {
        wp_enqueue_style('teaberry-fonts', esc_url_raw($font), array(), null);
    }
    /* loads our main stylesheet */
    wp_enqueue_style('teaberry-style', get_stylesheet_uri());
    /* loads the ie specific stylesheet */
    $styles = get_template_directory_uri() . '/css/ie.css';
    $depend = array('teaberry-style');
    wp_enqueue_style('teaberry-ie', $styles, $depend, '20121010');
    $wp_styles->add_data('teaberry-ie', 'conditional', 'lt IE 9');
}