catchresponsive_scripts

Enqueue scripts and styles.

Description

catchresponsive_scripts(); 

Usage

  1. if ( !function_exists( 'catchresponsive_scripts' ) ) { 
  2. require_once '/inc/catchresponsive-core.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = catchresponsive_scripts(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/inc/catchresponsive-core.php  
  1. function catchresponsive_scripts() { 
  2.  
  3. // Add Source Sans Pro and Bitter fonts, used in the main stylesheet. 
  4. wp_enqueue_style( 'catchresponsive-fonts', catchresponsive_fonts_url(), array(), null ); 
  5.  
  6. wp_enqueue_style( 'catchresponsive-style', get_stylesheet_uri() ); 
  7.  
  8. wp_enqueue_script( 'catchresponsive-navigation', get_template_directory_uri() . '/js/navigation.min.js', array(), '20120206', true ); 
  9.  
  10. // Load the html5 shiv. 
  11. wp_enqueue_script( 'catchresponsive-html5', get_template_directory_uri() . '/js/html5.min.js', array(), '3.7.3' ); 
  12. wp_script_add_data( 'catchresponsive-html5', 'conditional', 'lt IE 9' ); 
  13.  
  14. wp_enqueue_script( 'catchresponsive-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.min.js', array(), '20130115', true ); 
  15.  
  16. /** 
  17. * Adds JavaScript to pages with the comment form to support 
  18. * sites with threaded comments (when in use). 
  19. */ 
  20. if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { 
  21. wp_enqueue_script( 'comment-reply' ); 
  22.  
  23. //For genericons 
  24. wp_enqueue_style( 'genericons', get_template_directory_uri() . '/css/genericons/genericons.css', false, '3.4.1' ); 
  25.  
  26. /** 
  27. * Enqueue the styles for the current color scheme for catchresponsive. 
  28. */ 
  29. if ( $options['color_scheme'] != 'light' ) { 
  30. wp_enqueue_style( 'catchresponsive-dark', get_template_directory_uri() . '/css/colors/dark.css', array(), null ); 
  31.  
  32. /** 
  33. * Loads up Responsive Menu 
  34. */ 
  35. wp_enqueue_script( 'jquery-sidr', get_template_directory_uri() . '/js/jquery.sidr.min.js', array('jquery'), '2.2.1.1', false ); 
  36.  
  37. /** 
  38. * Loads default sidr color scheme styles(Does not require handle prefix) 
  39. */ 
  40. if ( 'dark' == $options['mobile_menu_color_scheme'] ) { 
  41. wp_enqueue_style( 'jquery-sidr', get_template_directory_uri() . '/css/jquery.sidr.dark.min.css', false, '2.1.0' ); 
  42. else { 
  43. wp_enqueue_style( 'jquery-sidr', get_template_directory_uri() . '/css/jquery.sidr.light.min.css', false, '2.1.0' ); 
  44.  
  45. wp_enqueue_script( 'jquery-fitvids', get_template_directory_uri() . '/js/fitvids.min.js', array( 'jquery' ), '1.1', true ); 
  46.  
  47.  
  48. /** 
  49. * Loads up Cycle JS 
  50. */ 
  51. if ( $options['featured_slider_option'] != 'disabled' ) { 
  52. wp_register_script( 'jquery.cycle2', get_template_directory_uri() . '/js/jquery.cycle/jquery.cycle2.min.js', array( 'jquery' ), '2.1.5', true ); 
  53.  
  54. /** 
  55. * Condition checks for additional slider transition plugins 
  56. */ 
  57. // Scroll Vertical transition plugin addition 
  58. if ( 'scrollVert' == $options['featured_slide_transition_effect'] ) { 
  59. wp_enqueue_script( 'jquery.cycle2.scrollVert', get_template_directory_uri() . '/js/jquery.cycle/jquery.cycle2.scrollVert.min.js', array( 'jquery.cycle2' ), '20140128', true ); 
  60. // Flip transition plugin addition 
  61. elseif ( 'flipHorz' == $options['featured_slide_transition_effect'] || 'flipVert' == $options['featured_slide_transition_effect'] ) { 
  62. wp_enqueue_script( 'jquery.cycle2.flip', get_template_directory_uri() . '/js/jquery.cycle/jquery.cycle2.flip.min.js', array( 'jquery.cycle2' ), '20140128', true ); 
  63. // Shuffle transition plugin addition 
  64. elseif ( 'tileSlide' == $options['featured_slide_transition_effect'] || 'tileBlind' == $options['featured_slide_transition_effect'] ) { 
  65. wp_enqueue_script( 'jquery.cycle2.tile', get_template_directory_uri() . '/js/jquery.cycle/jquery.cycle2.tile.min.js', array( 'jquery.cycle2' ), '20140128', true ); 
  66. // Shuffle transition plugin addition 
  67. elseif ( 'shuffle' == $options['featured_slide_transition_effect'] ) { 
  68. wp_enqueue_script( 'jquery.cycle2.shuffle', get_template_directory_uri() . '/js/jquery.cycle/jquery.cycle2.shuffle.min.js', array( 'jquery.cycle2' ), '20140128 ', true ); 
  69. else { 
  70. wp_enqueue_script( 'jquery.cycle2' ); 
  71.  
  72. /** 
  73. * Loads up Scroll Up script 
  74. */ 
  75. if ( ! $options['disable_scrollup'] ) { 
  76. wp_enqueue_script( 'catchresponsive-scrollup', get_template_directory_uri() . '/js/catchresponsive-scrollup.min.js', array( 'jquery' ), '20072014', true ); 
  77.  
  78. /** 
  79. * Enqueue custom script for catchresponsive. 
  80. */ 
  81. wp_enqueue_script( 'catchresponsive-custom-scripts', get_template_directory_uri() . '/js/catchresponsive-custom-scripts.min.js', array( 'jquery' ), null );