Esempio n. 1
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('mytemplate/css', Assets\asset_path('styles/main.css'), false, null);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('mytemplate/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
    wp_enqueue_script('mytemplate/js/navigation', Assets\asset_path('scripts/components/navigation.js'), ['jquery'], null, true);
    wp_enqueue_script('mytemplate/js/skip-link-focus', Assets\asset_path('scripts/common/skip-link-focus-fix.js'), ['jquery'], null, true);
}
Esempio n. 2
0
/**
 * Customizer JS
 */
function customize_preview_js()
{
    wp_enqueue_script('mytemplate/customizer', Assets\asset_path('scripts/customizer.js'), ['customize-preview'], null, true);
}