Question about the way that wp_register_script works

For the record this entirely the wrong thing to do.

Themes should avoid (read never!) de-register the WordPress registered jQuery scripts (plug-ins should absolutely never do this).

If a theme is to de-register the jquery script (to replace it) then it should re-register it properly:

 wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js');

Here-in lies the problem. The above is taken from the codex. The jQuery version above is now out of date, and potentially, could break plug-ins. This is why themes and plug-ins should avoid replacing the jQuery version.

The theme above is a wonderful demonstration of poor practise. Not only does it not re-register jQuery properly, but it then proceeds to print it directly in the header (regardless of when its needed).

In answer to:

So I’m wondering, by including the script tags that load jQuery in the header.php does that mean WordPress is aware of them as far as calling wp_register_script goes?

No.

I’m asking because I wanted to try this technique but I didn’t get the results I expected. Namely, javascripts that I included using wp_enqueue and that depended on jQuery still loaded even when I removed the script tags that includethem in the header, which, means the javascripts I loaded failed because there was no jQuery being loaded

Yup, WordPress thought jQuery was being loaded (but actually ” was passed as the path to the file – this probably should have caused an error.). Hence your scripts were still loaded, even when jQuery wasn’t actually loaded.

wp_register_script (and the related functions) exist to load javascript, while handling dependencies, in a conflict-free way. Not using it, as this theme is trying to do, breaks things.

error code: 523