Advertisement
sbruner

easing-slider: load on home page

Sep 16th, 2011
486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. function jake_add_scripts {
  2.  
  3. if (is_home() || is_front_page()) {
  4.  
  5. $scripturl = WP_PLUGIN_URL .'/easing-slider/js/';
  6.  
  7. if(get_option('jquery') == 'true') {
  8. if ( !is_admin() ) {
  9. wp_deregister_script('jquery');
  10. wp_register_script('jquery', $scripturl.'jquery.js', '', '1.4.2');
  11. wp_enqueue_script('jquery');
  12. }
  13. }
  14.  
  15. wp_register_script('easing', $scripturl.'jquery.easing.js', '', '1.3');
  16. wp_enqueue_script('easing');
  17. wp_register_script('script', $scripturl.'script.js', '', '1.1.9');
  18. wp_enqueue_script('script');
  19.  
  20. }
  21. }
  22.  
  23. function jake_add_styles() {
  24. if (is_home() || is_front_page()) {
  25. $sliderstyle = WP_PLUGIN_URL .'/easing-slider/css/slider.css';
  26.  
  27. wp_register_style('slider', $sliderstyle, '', '1.1.9');
  28. wp_enqueue_style('slider');
  29. }
  30.  
  31. }
  32. remove_action('wp_print_styles','add_styles');
  33. remove_action('wp_print_scripts','add_scripts');
  34. add_action('wp_print_styles','jake_add_styles');
  35. add_action('wp_print_scripts','jake_add_scripts');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement