Beispiel #1
0
/**
 * Enqueue Google Fonts for custom headers
 */
function keratin_custom_header_fonts()
{
    wp_enqueue_style('keratin-fonts', keratin_google_fonts_url(), array(), null);
}
Beispiel #2
0
/**
 * Enqueue scripts and styles.
 */
function keratin_scripts()
{
    /**
     * Enqueue JS files
     */
    // Masonry
    wp_enqueue_script('masonry');
    // Modernizr
    wp_enqueue_script('keratin-modernizr', get_template_directory_uri() . '/js/modernizr.js', array('jquery'), '2.7.1', true);
    // Superfish Menu
    wp_enqueue_script('keratin-hover-intent', get_template_directory_uri() . '/js/hover-intent.js', array('jquery'), 'r7', true);
    wp_enqueue_script('keratin-superfish', get_template_directory_uri() . '/js/superfish.js', array('jquery'), '1.7.5', true);
    // Fitvids
    wp_enqueue_script('keratin-fitvids', get_template_directory_uri() . '/js/fitvids.js', array('jquery'), '1.0.3', true);
    // Comment Reply
    if (is_singular() && get_option('thread_comments') && comments_open()) {
        wp_enqueue_script('comment-reply');
    }
    // Keyboard image navigation support
    if (is_singular() && wp_attachment_is_image()) {
        wp_enqueue_script('keratin-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array('jquery'), '20140127', true);
    }
    // Custom Script
    wp_enqueue_script('keratin-custom', get_template_directory_uri() . '/js/custom.js', array('jquery'), '1.0', true);
    /**
     * Enqueue CSS files
     */
    // Bootstrap
    wp_enqueue_style('keratin-bootstrap', get_template_directory_uri() . '/css/bootstrap.css');
    // Fontawesome
    wp_enqueue_style('keratin-fontawesome', get_template_directory_uri() . '/css/font-awesome.css');
    // Google Fonts
    wp_enqueue_style('keratin-fonts', keratin_google_fonts_url(), array(), null);
    // Theme Stylesheet
    wp_enqueue_style('keratin-style', get_stylesheet_uri());
}