Exemple #1
2
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('roboto/material', '//fonts.googleapis.com/css?family=Material+Icons|Roboto+Slab|Roboto:400,500,300,700', false, null);
    //  wp_enqueue_style('roboto/font', '//fonts.googleapis.com/css?family=Roboto+Slab:400,700,300|Roboto:400,500,700,900,300', false, null );
    //  wp_enqueue_style('material/font', '//fonts.googleapis.com/icon?family=Material+Icons', false, null );
    wp_enqueue_style('blueprint/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('blueprint/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
}
Exemple #2
1
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('google_fonts', '//fonts.googleapis.com/css?family=Open+Sans:400,300,700&subset=latin,cyrillic', false, null);
    wp_enqueue_style('sage/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('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
    /** Localize Scripts */
    $php_array = array('admin_ajax' => admin_url('admin-ajax.php'));
    wp_localize_script('sage/js', 'php_array', $php_array);
}
Exemple #3
0
/**
 * Theme setup
 */
function setup()
{
    global $redux_demo;
    $options = $redux_demo;
    // Make theme available for translation
    // Community translations can be found at https://github.com/roots/sage-translations
    load_theme_textdomain('sage', get_template_directory() . '/lang');
    // Enable plugins to manage the document title
    // http://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag
    add_theme_support('title-tag');
    // Register wp_nav_menu() menus
    // http://codex.wordpress.org/Function_Reference/register_nav_menus
    register_nav_menus(['primary_navigation' => __('Primary Navigation', 'sage')]);
    // Add post thumbnails
    // http://codex.wordpress.org/Post_Thumbnails
    // http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
    // http://codex.wordpress.org/Function_Reference/add_image_size
    add_theme_support('post-thumbnails');
    add_image_size('slider', 1200, 600, true);
    update_option('medium_crop', 0);
    update_option('large_crop', 0);
    // Add post formats
    // http://codex.wordpress.org/Post_Formats
    //add_theme_support('post-formats', ['aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio']);
    // Add HTML5 markup for captions
    // http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
    add_theme_support('html5', ['caption', 'comment-form', 'comment-list']);
    // Tell the TinyMCE editor to use a custom stylesheet
    add_editor_style(Assets\asset_path('styles/editor-style.css'));
    // Allow shortcode execution in widgets
    add_filter('widget_text', 'do_shortcode');
}
function custom_admin_assets()
{
    if (class_exists('Roots\\Sage\\Assets')) {
        wp_enqueue_style('admin-style', Assets\asset_path('styles/admin-style.css'));
        wp_enqueue_script('admin-script', Assets\asset_path('scripts/admin-script.js'));
    }
}
Exemple #5
0
/**
 * Theme setup
 */
function setup()
{
    // Make theme available for translation
    // Community translations can be found at https://github.com/roots/sage-translations
    load_theme_textdomain('sage', get_template_directory() . '/lang');
    // Enable plugins to manage the document title
    // http://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag
    add_theme_support('title-tag');
    // Register wp_nav_menu() menus
    // http://codex.wordpress.org/Function_Reference/register_nav_menus
    register_nav_menus(['sobre-topo' => 'Menu "Sobre" do topo das páginas', 'sobre-footer' => 'Menu "Sobre" do rodapé das páginas', 'software-topo' => 'Menu "Software" do topo das páginas', 'software-footer' => 'Menu "Software" do rodapé das páginas', 'software-home' => 'Botões da seção "Software" da home', 'cursos-topo' => 'Menu "Cursos" do topo das páginas', 'cursos-footer' => 'Menu "Cursos" do rodapé das páginas', 'cursos-home' => 'Botões da seção "Cursos" da home', 'rede-topo' => 'Menu "Rede" do topo das páginas', 'rede-footer' => 'Menu "Rede" do rodapé das páginas', 'rede-home' => 'Botões da seção "Rede" da home']);
    // Add post thumbnails
    // http://codex.wordpress.org/Post_Thumbnails
    // http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
    // http://codex.wordpress.org/Function_Reference/add_image_size
    add_theme_support('post-thumbnails');
    // Add post formats
    // http://codex.wordpress.org/Post_Formats
    add_theme_support('post-formats', ['aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio']);
    // Add HTML5 markup for captions
    // http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
    add_theme_support('html5', ['caption', 'comment-form', 'comment-list']);
    // Tell the TinyMCE editor to use a custom stylesheet
    add_editor_style(Assets\asset_path('styles/editor-style.css'));
}
Exemple #6
0
/**
 * Theme setup
 */
function setup()
{
    // Make theme available for translation
    // Community translations can be found at https://github.com/roots/rubi-translations
    load_theme_textdomain('rubi', get_template_directory() . '/lang');
    // Enable plugins to manage the document title
    // http://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag
    add_theme_support('title-tag');
    // Register wp_nav_menu() menus
    // http://codex.wordpress.org/Function_Reference/register_nav_menus
    register_nav_menus(['primary_navigation' => __('Primary Navigation', 'rubi')]);
    // Add post thumbnails
    // http://codex.wordpress.org/Post_Thumbnails
    // http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
    // http://codex.wordpress.org/Function_Reference/add_image_size
    add_theme_support('post-thumbnails');
    // Add post formats
    // http://codex.wordpress.org/Post_Formats
    add_theme_support('post-formats', ['aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio']);
    // Add HTML5 markup for captions
    // http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
    add_theme_support('html5', ['caption', 'comment-form', 'comment-list']);
    // Tell the TinyMCE editor to use a custom stylesheet
    add_editor_style(Assets\asset_path('styles/editor-style.css'));
}
Exemple #7
0
/**
 * Aggiungo uno script in homepage
 */
function front_page_scripts()
{
    if (is_front_page()) {
        wp_enqueue_script('frontpage.js', Assets\asset_path('scripts/frontpage.js'), ['jquery']);
        wp_enqueue_script('gsap.js', Assets\asset_path('scripts/gsap.js'));
        wp_enqueue_script('scrollmagic.js', Assets\asset_path('scripts/scrollmagic.js'));
    }
}
Exemple #8
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('pressbooks-publisher/css', Assets\asset_path('styles/main.css'), false, null);
    wp_enqueue_style('pressbooks-publisher/fonts', 'https://fonts.googleapis.com/css?family=Droid+Sans|Droid+Serif:400,400italic,700|Oswald', false, null);
    wp_enqueue_script('pressbooks-publisher/skip-link-focus-fix', Assets\asset_path('scripts/skip-link-focus-fix.js'), [], null, true);
    wp_enqueue_script('pressbooks-publisher/match-height', Assets\asset_path('scripts/matchheight.js'), ['jquery'], null, true);
    wp_enqueue_script('pressbooks-publisher/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
}
Exemple #9
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/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('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
}
Exemple #10
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('google_fonts', '//fonts.googleapis.com/css?family=Source+Sans+Pro:400italic,400,700', false, null);
    wp_enqueue_style('sage/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('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
}
Exemple #11
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/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('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
    wp_localize_script('sage/js', 'themeUri', array('pages' => trailingslashit(get_template_directory_uri()) . 'pages/', 'templates' => trailingslashit(get_template_directory_uri()) . 'templates/'));
}
Exemple #12
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('wpb-google-fonts', 'href="https://fonts.googleapis.com/css?family=Raleway:400,100,200,300,600,700,900,800,500|Montserrat:400,700"', false);
    wp_enqueue_style('sage/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('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
}
Exemple #13
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('google-fonts', 'https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,300italic,700|Rubik:300,300italic,700,700italic', false, null);
    wp_enqueue_style('sage/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('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
}
Exemple #14
0
/**
 * Theme setup
 */
function setup()
{
    // Make theme available for translation
    // Community translations can be found at https://github.com/roots/sage-translations
    load_theme_textdomain('sage', get_template_directory() . '/lang');
    // Enable plugins to manage the document title
    // http://codex.wordpress.org/Function_Reference/add_theme_support#Title_Tag
    add_theme_support('title-tag');
    // Register wp_nav_menu() menus
    // http://codex.wordpress.org/Function_Reference/register_nav_menus
    register_nav_menus(['primary_navigation' => __('Primary Navigation', 'odfw')]);
    // Add post thumbnails
    // http://codex.wordpress.org/Post_Thumbnails
    // http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
    // http://codex.wordpress.org/Function_Reference/add_image_size
    add_theme_support('post-thumbnails');
    add_image_size('hero', 1600, 580, true);
    add_image_size('grid', 255, 185, true);
    add_image_size('listing', 116, 63, false);
    add_filter('image_size_names_choose', function ($sizes) {
        return array_merge($sizes, array("listing" => __("Listing"), "grid" => __("Grid")));
    });
    //if(get_option('medium_size_w')!=640) update_option('medium_size_w',640);
    //if(get_option('medium_size_h')!=320) update_option('medium_size_h',320);
    if (get_option('large_size_w') != 750) {
        update_option('large_size_w', 750);
    }
    if (get_option('large_size_h') != 9999) {
        update_option('large_size_h', 9999);
    }
    // Defaults for inserting images
    update_option('image_default_align', 'none');
    update_option('image_default_link_type', 'none');
    update_option('image_default_size', 'large');
    update_option('upload_path', $_SERVER['DOCUMENT_ROOT'] . '/media');
    update_option('upload_url_path', 'http://' . $_SERVER['SERVER_NAME'] . '/media');
    add_filter('jpeg_quality', function ($arg) {
        return 75;
    });
    // Add post formats
    // http://codex.wordpress.org/Post_Formats
    add_theme_support('post-formats', ['gallery']);
    // Add HTML5 markup for captions
    // http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
    add_theme_support('html5', ['caption']);
    // Tell the TinyMCE editor to use a custom stylesheet
    add_editor_style(Assets\asset_path('styles/editor-style.css'));
    /* Doesn't need to be set over and over again so commented for now
      	// We need the medium and large image sizes to be cropped.
    	if(false === get_option("medium_crop")):
    		add_option("medium_crop", "1");
    	else:
    		update_option("medium_crop", "1");
    	endif;
     */
}
Exemple #15
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/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('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
    wp_enqueue_script('sage/ScrollToFixed_js', Assets\asset_path('scripts/jquery-scrolltofixed-min.js'), ['jquery'], null, true);
    // wp_enqueue_script('sage/uisearch_js', Assets\asset_path('scripts/uisearch.js'), ['jquery'], null, true);
}
Exemple #16
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/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('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
    wp_enqueue_script('flexslider/js', Assets\asset_path('scripts/flexslider-config.js'), ['jquery'], null, true);
    wp_enqueue_script('blueimp-gallery/js', Assets\asset_path('scripts/blueimp-gallery-config.js'), ['jquery'], null, true);
}
Exemple #17
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/css', Assets\asset_path('styles/main.css'), false, null);
    wp_enqueue_style('animate', Assets\asset_path('styles/animate.css'), false, null);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
    wp_enqueue_script('gsap-js', 'http://cdnjs.cloudflare.com/ajax/libs/gsap/1.18.0/TweenLite.min.js', array(), false, true);
}
Exemple #18
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/css', Assets\asset_path('styles/main.css'), false, null);
    wp_enqueue_style('fontawesome', "https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css");
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
    wp_enqueue_script('typekit', 'https://use.typekit.net/clt1mze.js');
}
Exemple #19
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/css', Assets\asset_path('styles/main.css'), false, null);
    wp_enqueue_style('crbicon', 'http://guidestyles.bretagne.bzh/styles/crbicon.css', false, null);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_register_script('tether', Assets\asset_path('scripts/tether.js'), [], null, true);
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery', 'tether'], null, true);
}
Exemple #20
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/css', Assets\asset_path('styles/main.css'), false, null);
    wp_enqueue_style('googlefonts', 'https://fonts.googleapis.com/css?family=Open+Sans:400,400italic|Oswald:300,400', false);
    wp_enqueue_style('fontawesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', false);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('google_maps', 'https://maps.googleapis.com/maps/api/js?v=3.exp');
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, false);
}
Exemple #21
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/normalize', Assets\asset_path('styles/normalize.css'), false, null);
    wp_enqueue_style('sage/css', Assets\asset_path('styles/main.css'), false, null);
    //wp_enqueue_style('sage/shame_css', get_stylesheet_directory_uri().'/shame/shame.css', false, null);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
    //wp_enqueue_script('sage/shame_js', get_stylesheet_directory_uri().'/shame/shame.js', ['jquery'], null, true);
}
Exemple #22
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/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_style('fullcalendar.min-style', BDR_SYSTEM_DIR_URI . '/assets/vendor/fullcalendar.min.css');
    wp_enqueue_style('fullcalendar.print.min-style', BDR_SYSTEM_DIR_URI . '/assets/vendor/fullcalendar.print.css', array(), null, 'print');
    wp_enqueue_script('moment.min-script', BDR_SYSTEM_DIR_URI . '/assets/vendor/moment.min.js');
    wp_enqueue_script('fullcalendar.min-script', BDR_SYSTEM_DIR_URI . '/assets/vendor/fullcalendar.min.js', array('moment.min-script', 'jquery'), false, false);
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
    wp_localize_script('sage/js', 'BDR', array('template_dir_uri' => get_template_directory_uri(), 'site_name' => get_bloginfo('name'), 'phone' => get_theme_mod('bdr_contact_us_phone'), 'address' => get_theme_mod('bdr_contact_us_address'), 'email' => get_theme_mod('bdr_contact_us_email'), 'url' => get_bloginfo('url')));
}
Exemple #23
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', false, null);
    wp_enqueue_style('animate', Assets\asset_path('css/vendor/animate.min.css'));
    wp_enqueue_style('styles', Assets\asset_path('css/app.min.css'), false, null);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    // TODO: combine with app.min.js in build
    wp_enqueue_script('slideout-js', 'https://cdnjs.cloudflare.com/ajax/libs/slideout/0.1.11/slideout.min.js', ['jquery'], null, true);
    wp_enqueue_script('modernizer', Assets\asset_path('js/vendor/modernizr.min.js'), [], null, true);
    wp_enqueue_script('scripts', Assets\asset_path('js/app.min.js'), ['jquery'], null, true);
}
Exemple #24
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/css', Assets\asset_path('styles/main.css'), false, null);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    $localized_array = array('ajaxurl' => admin_url('admin-ajax.php'));
    if (\Helpers::check_internet_connection()) {
        wp_enqueue_script('stripe/js', 'https://js.stripe.com/v2/');
    }
    wp_enqueue_script('freewall/js', Assets\asset_path('scripts/freewall.js'), ['jquery'], null, false);
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
    wp_localize_script('sage/js', 'sage_vars', $localized_array);
}
Exemple #25
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/css', Assets\asset_path('styles/main.css'), false, null);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    function insert_jquery()
    {
        wp_enqueue_script('jquery', false, array(), false, false);
    }
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
    wp_enqueue_script('sage/slider', Assets\asset_path('scripts/sss.js'), ['jquery'], null, false);
    wp_enqueue_script('sage/flexslider', Assets\asset_path('scripts/flexslider.js'), ['jquery'], null, false);
}
Exemple #26
0
/**
 * Theme assets
 */
function assets()
{
    // wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );
    wp_enqueue_style('sage/css', Assets\asset_path('styles/main.css'), false, null);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    if (is_page('gmaps')) {
        wp_enqueue_script('alert/js', 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false', ['jquery'], null, true);
    }
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
    // if (is_page('gmaps')) {
    //   wp_enqueue_script('alert/js', Assets\asset_path('scripts/vendor/alert.js'), ['jquery'], null, true);
    // }
}
Exemple #27
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('main.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('modernizr', Assets\asset_path('scripts/modernizr.js'), [], null, false);
    wp_enqueue_script('jquery', Assets\asset_path('scripts/jquery.js'), [], null, true);
    wp_enqueue_script('enquire', Assets\asset_path('scripts/enquire.js'), ['jquery'], null, true);
    wp_enqueue_script('slick-carousel', Assets\asset_path('scripts/slick-carousel.js'), ['jquery'], null, true);
    wp_enqueue_script('jquery-validation', Assets\asset_path('scripts/jquery-validation.js'), ['jquery'], null, true);
    wp_enqueue_script('jquery-easing', Assets\asset_path('scripts/jquery-easing.js'), ['jquery'], null, true);
    wp_enqueue_script('smoothstate', Assets\asset_path('scripts/smoothstate.js'), ['jquery'], null, true);
    wp_enqueue_script('main-js', Assets\asset_path('scripts/main.js'), ['jquery', 'enquire', 'slick-carousel', 'jquery-validation', 'jquery-easing', 'smoothstate'], null, true);
}
Exemple #28
0
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/css', Assets\asset_path('styles/main.css'), false, null);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    ///
    // header scripts
    ///
    wp_enqueue_script('modernizr', Assets\asset_path('scripts/modernizr-custom.js'), [], null, false);
    // add svg4everybody for IE9 +
    wp_enqueue_script('sage/sg4everybody', Assets\asset_path('scripts/svg4everybody.min.js'), __FILE__, false);
    // add svg4everybody for IE8 and down
    wp_register_script('sage/sg4everybody-legacy', Assets\asset_path('scripts/svg4everybody.legacy.min.js'), __FILE__, false);
    wp_enqueue_script('sage/sg4everybody-legacy');
    wp_script_add_data('sage/sg4everybody-legacy', 'conditional', 'lte IE 8');
    ///
    // footer scripts
    ///
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], null, true);
}
Exemple #29
-1
/**
 * Theme assets
 */
function assets()
{
    $theme = wp_get_theme();
    $theme_version = $theme->get('Version');
    wp_enqueue_style('sage/css', Assets\asset_path('styles/main.css'), false, $theme_version);
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['jquery'], $theme_version, true);
}
Exemple #30
-2
/**
 * Theme assets
 */
function assets()
{
    wp_enqueue_style('sage/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('jquery-throttle', 'http://cdnjs.cloudflare.com/ajax/libs/jquery-throttle-debounce/1.1/jquery.ba-throttle-debounce.min.js', ['jquery'], null, true);
    wp_enqueue_script('vendor/js', Assets\asset_path('scripts/vendor.js'), ['jquery'], null, true);
    wp_enqueue_script('grid', Assets\asset_path('scripts/grid.js'), ['vendor/js'], null, true);
    wp_enqueue_script('sage/js', Assets\asset_path('scripts/main.js'), ['grid'], null, true);
}