Advertisement
rhandom

migrate enqueue

Jul 16th, 2014
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.39 KB | None | 0 0
  1. add_action('wp_enqueue_scripts', 'ts_scripts');
  2.    
  3.     function ts_scripts() {
  4.    
  5.         wp_enqueue_script('jquery');
  6.        
  7.         wp_enqueue_script('superfish', TS_SCRIPTS . 'superfish/superfish.js', array('jquery'), '1.4.8', true);
  8.         wp_enqueue_script('supersubs', TS_SCRIPTS . 'superfish/supersubs.js', array('jquery'), '1.4.8', true);
  9.         wp_enqueue_style('superfish', TS_SCRIPTS . 'superfish/superfish.css', false, '1.4.8', 'all' );
  10.         wp_enqueue_script('legend', '/wp-content/themes/decondo-child/lib/scripts/legend.js','jquery');
  11.          wp_enqueue_script('jquerymigrate', '/wp-content/themes/decondo-child/lib/scripts/jquery-migrate.js','jquery');
  12.         if(is_front_page() || post_is_in_category_or_child_category( 'destinations' ) ) : // Made chages in base
  13.             wp_enqueue_script('jquery-ui-core');
  14.             wp_enqueue_script('jquery-ui-tabs');
  15.         endif;
  16.        
  17.         if (in_category(get_cat_id(ts_get_option('ts_news_cat'))) && is_singular())
  18.             wp_enqueue_script('comment-reply');
  19.            
  20.            
  21.        
  22.         if (is_singular()) :
  23.             wp_enqueue_script('prettyPhoto', TS_SCRIPTS . 'pretty/jquery.prettyPhoto.js', array('jquery', 'jquerymigrate'), '2.5', false);
  24.             wp_enqueue_script('pretty', TS_SCRIPTS . 'pretty/pretty.js', array('jquery'), '0.9.5', false);
  25.             wp_enqueue_style('pretty', TS_SCRIPTS . 'pretty/prettyPhoto.css', false, '1', 'all' );
  26.         endif;
  27.     }
  28.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement