Example #1
0
/**
 * Register Scripts
 */
function nevertheless_register_scripts()
{
    global $tamatebako;
    $name = $tamatebako->name;
    /* FitVids (JS) */
    wp_register_script("fitvids", tamatebako_theme_file("assets/js/jquery.fitvids", "js"), array('jquery'), '1.1.0', true);
    /* Theme Custom (JS) */
    wp_register_script("{$name}-script", tamatebako_theme_file("assets/js/jquery.theme", "js"), array('jquery', 'fitvids'), tamatebako_theme_version(), true);
    /* === CSS === */
    /* Genericons */
    wp_register_style("genericons", tamatebako_theme_file("assets/genericons/genericons", "css"), array(), '3.3.1', 'all');
    /* Theme Debug */
    wp_register_style("{$name}-debug", tamatebako_theme_file("assets/css/base/debug", "css"), array());
}
Example #2
0
/**
 * Returns the (parent) theme stylesheet URI.  Will return the active theme's stylesheet URI if no child
 * theme is active. Be sure to check `is_child_theme()` when using.
 */
function tamatebako_get_parent_stylesheet_uri()
{
    $css = tamatebako_theme_file('assets/css/style', 'css');
    $css = $css ? $css : get_template_directory_uri() . '/style.css';
    return apply_filters('tamatebako_get_parent_stylesheet_uri', $css);
}
Example #3
0
/**
 * Register CSS
 * Stylesheet can be loaded using 'hybrid-core-styles' theme support.
 * @since 0.1.0
 */
function tamatebako_register_css()
{
    /* Google Fonts: Open Sans / font-family: 'Open Sans', sans-serif; */
    wp_register_style('theme-open-sans-font', tamatebako_google_open_sans_font_url(), array(), tamatebako_theme_version(), 'all');
    /* Google Fonts: Open Sans / font-family: 'Merriweather', serif; */
    wp_register_style('theme-merriweather-font', tamatebako_google_merriweather_font_url(), array(), tamatebako_theme_version(), 'all');
    /* Reset CSS */
    $reset_css = tamatebako_theme_file("css/reset", "css");
    if (!empty($reset_css)) {
        wp_register_style('theme-reset', $reset_css, array(), tamatebako_theme_version(), 'all');
    }
    /* Menus CSS */
    $menus_css = tamatebako_theme_file("css/menus", "css");
    if (!empty($menus_css)) {
        wp_register_style('theme-menus', $menus_css, array(), tamatebako_theme_version(), 'all');
    }
    /* Media Queries CSS */
    $media_queries_css = tamatebako_theme_file("css/media-queries", "css");
    if (!empty($media_queries_css)) {
        wp_register_style('media-queries', $media_queries_css, array(), tamatebako_theme_version(), 'all');
    }
    /* Debug Media Queries */
    $debug_mq_css = tamatebako_theme_file("css/debug-media-queries", "css");
    if (!empty($debug_mq_css)) {
        wp_register_style('debug-media-queries', $debug_mq_css, array(), tamatebako_theme_version(), 'all');
    }
    /* Flexslider (private use) */
    $flexslider_css = tamatebako_theme_file("css/flexslider", "css");
    if (!empty($flexslider_css)) {
        wp_register_style('theme-flexslider', $flexslider_css, array(), '2.2.2', 'all');
    }
    /* Theme Custom */
    $theme_css = tamatebako_theme_file("css/theme", "css");
    if (!empty($theme_css)) {
        wp_register_style('theme', $theme_css, array(), tamatebako_theme_version(), 'all');
    }
}
Example #4
0
/**
 * Check JS Status
 * Script to modify "no-js" to "js" in body class.
 * Need to be added after the opening "<body>" tag.
 *
 * @since 0.1.0
 */
function tamatebako_check_js_script()
{
    $js_status = tamatebako_theme_file("js/js-status", "js");
    $script = '';
    if (!empty($js_status)) {
        $script = '<script src="' . $js_status . '" type="text/javascript"></script>';
    }
    return apply_filters('tamatebako_check_js_script', $script);
}