murtaugh / HTML5-Reset-WordPress-Theme

A style-free WordPress theme to get you started with proper HTML5 semantics and structures.
1.1k stars 286 forks source link

functions.php #107

Closed laragon closed 9 years ago

laragon commented 10 years ago

Hi Guys,

Not really an issue but on line 94 in the functions.php I found that there is a "!" before functions_exists

//OLD STUFF BELOW

// Load jQuery
if ( !function_exists( 'core_mods' ) ) {
    function core_mods() {
        if ( !is_admin() ) {
            wp_deregister_script( 'jquery' );
            wp_register_script( 'jquery', ( "//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" ), false);
            wp_enqueue_script( 'jquery' );
        }
    }
    add_action( 'wp_enqueue_scripts', 'core_mods' );
} 

*I had to delete the "!" to make the BMO Expo plugin work properly.

btw great job with html5reset. very useful when I need a blank canvas

-Louie

isdampe commented 10 years ago

The coding looks correct for this block, but perhaps the wp_register_script needs adjustment.

I believe WP requires the wp_register_script to have either http or https specified, relative url's aren't accepted.

ckhicks commented 10 years ago

wp_register_script() according to the codex: "Remote scripts can be specified with a protocol-agnostic URL, e.g. //otherdomain.com/js/their-script.js." (source)

I may remove the check for core_mods() just to keep things clean, relying on is_admin() to guide the proper inclusion of jQuery. Thoughts?