title: wp_unregister and wp_enqueue
body: <p>it's been suggested to me to use wp_unregister and wp_enqueue to replace wordpress jquery library with a google hosted one (because the wordpress one was having some problems)</p>
  
  <p>However, when i try to insert these into my wordpress site, it breaks my site. </p>
  
  <p>Do I need to wrap them somehow?</p>
  
  <pre><code>wp_unregister_script('jquery');
  wp_unregister_script('jquery-ui-core');
  
  wp_enqueue_script('jquery', https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js);
  wp_enqueue_script('jquery-ui-core', https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js);
  </code></pre>
  
  <p>My site has a custom folder where I can put custom functions. I tried this unsuccessfully</p>
  
  <pre><code>function googlejqueryhost(){
  
  
  &lt;?php
  wp_unregister_script('jquery');
  wp_unregister_script('jquery-ui-core');
  
  wp_enqueue_script('jquery', https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js);
  wp_enqueue_script('jquery-ui-core', https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js);
  
  
  ?&gt;
  }
  add_action('wp_head', 'googlejqueryhost');
  </code></pre>