function nebula_dequeues()
{
    if (!is_admin()) {
        //Styles
        wp_deregister_style('cff-font-awesome');
        //Custom Facebook Feed - We enqueue the latest version of Font Awesome ourselves
        wp_deregister_style('contact-form-7');
        //Contact Form 7 - Not sure specifically what it is styling, so removing it unless we decide we need it.
        //Scripts
        if (nebula_is_browser('ie', '8', '<=')) {
            //WP Core - Dequeue jQuery Migrate for browsers that don't need it.
            wp_deregister_script('jquery');
            wp_register_script('jquery', false, array('jquery-core'), '1.11.0');
            //Just have to make sure this version reflects the actual jQuery version bundled with WP (click the jquery.js link in the source)
        }
        //Page specific dequeues
        if (is_front_page()) {
            //Styles
            wp_deregister_style('thickbox');
            //WP Core Thickbox - Comment out if thickbox type gallery IS used on the homepage.
            //Scripts
            wp_deregister_script('thickbox');
            //WP Thickbox - Comment out if thickbox type gallery IS used on the homepage.
        }
    }
}
 function nebula_calling_card()
 {
     $console_log = "<script>";
     if (nebula_is_desktop() && !nebula_is_browser('ie') && !nebula_is_browser('edge')) {
         $console_log .= "console.log('%c', 'padding: 28px 119px; line-height: 35px; background: url(" . get_template_directory_uri() . "/images/phg/phg-logo.png) no-repeat; background-size: auto 60px;');";
         $console_log .= "console.log('%c Created using Nebula ', 'padding: 2px 10px; background: #0098d7; color: #fff;');";
     }
     $console_log .= "</script>";
     echo $console_log;
 }
				Is it less than Chrome 44? <strong><?php 
    echo nebula_is_browser('chrome', 43, 'lt') ? 'Yes' : 'No';
    ?>
</strong><br />
			<?php 
} elseif (nebula_is_browser('firefox')) {
    ?>
				Is it less than Firefox 35? <strong><?php 
    echo nebula_is_browser('firefox', 38, '<') ? 'Yes' : 'No';
    ?>
</strong>
			<?php 
} elseif (nebula_is_browser('safari')) {
    ?>
				Is it less than Safari 6? <strong><?php 
    echo nebula_is_browser('safari', 5, 'lt') ? 'Yes' : 'No';
    ?>
</strong>
			<?php 
}
?>
		</p>
	</div><!--/columns-->
</div><!--/row-->

<br />
<div class="row">
	<div class="sixteen columns">
		<hr />
		<p>See all data Nebula can see - <a href="https://gearside.com/nebula/documentation/utilities/environment-feature-detection/">Full environment detection &raquo;</a></p>
	</div><!--/columns-->
Example #4
0
function enqueue_nebula_frontend()
{
    global $upload_dir, $localize_bloginfo, $localize_postinfo, $localize_clientinfo, $localize_nebula_options;
    //Stylesheets
    wp_enqueue_style('nebula-normalize');
    wp_enqueue_style('nebula-gumby');
    wp_enqueue_style('nebula-mmenu');
    //wp_enqueue_style('nebula-animate_css');
    wp_enqueue_style('nebula-jquery_ui');
    wp_enqueue_style('nebula-font_awesome');
    wp_enqueue_style('nebula-google_font');
    wp_enqueue_style('nebula-main');
    if (!nebula_option('nebula_wireframing', 'disabled')) {
        wp_enqueue_style('nebula-wireframing');
        wp_enqueue_script('nebula-wireframing');
    }
    //Scripts
    wp_enqueue_script('jquery');
    wp_enqueue_script('nebula-jquery_ui');
    //wp_enqueue_script('swfobject');
    //wp_enqueue_script('hoverIntent');
    //wp_enqueue_script('nebula-modernizr_dev');
    wp_enqueue_script('nebula-modernizr');
    wp_enqueue_script('nebula-mmenu');
    //wp_enqueue_script('nebula-doubletaptogo');
    wp_enqueue_script('nebula-headroom');
    wp_enqueue_script('nebula-gumby');
    wp_enqueue_script('nebula-main');
    wp_localize_script('nebula-main', 'bloginfo', $localize_bloginfo);
    wp_localize_script('nebula-main', 'postinfo', $localize_postinfo);
    wp_localize_script('nebula-main', 'clientinfo', $localize_clientinfo);
    wp_localize_script('nebula-main', 'nebula_options', $localize_nebula_options);
    //Conditionals
    if (is_debug()) {
        //When ?debug query string is used
        wp_enqueue_script('nebula-performance_timing');
        //wp_enqueue_script('nebula-mmenu_debugger');
    }
    if (nebula_is_browser('ie', '9', '<=')) {
        //Old IE
        wp_enqueue_script('nebula-respond');
        wp_enqueue_script('nebula-html5shiv');
        //wp_deregister_script('jquery'); //Uncomment the next jQuery lines if WordPress bundles jQuery 2.0+ (currently bundles jQuery 1.11.2)
        //wp_enqueue_script('nebula-jquery_old'); //Uncomment the next jQuery lines if WordPress bundles jQuery 2.0+ (currently bundles jQuery 1.11.2)
    }
    if (!empty($GLOBALS['ga']) && nebula_option('nebula_cd_adblocker')) {
        wp_enqueue_script('nebula-adblockcheck');
        //Detect if user is blocking ads. If the custom dimension is active- removing this line will cause false positives.
    }
    if (is_page_template('tpl-search.php') || is_page(9999)) {
        //Form pages (that use selects) or Advanced Search Template. The Chosen library is also dynamically loaded in main.js.
        wp_enqueue_style('nebula-chosen');
        wp_enqueue_script('nebula-chosen');
    }
    if (is_page(9999)) {
        //Datatables pages. The Datatables library is also dynamically loaded in main.js
        wp_enqueue_style('nebula-datatables');
        wp_enqueue_script('nebula-datatables');
    }
    if (is_page(9999)) {
        //Twitter pages (conditional may need to change depending on type of page it's used on)
        wp_enqueue_script('nebula-twitter');
        //wp_enqueue_script('nebula-moment'); //Uncomment if using moment.js instead of Date.parse() for times.
    }
    if (nebula_is_desktop()) {
        //Desktop traffic only
        //wp_enqueue_script('nebula-skrollr');
    }
}