Advertisement
firoze

wordpress all enqueuee

Feb 28th, 2015
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.61 KB | None | 0 0
  1. // wp enqueue
  2. // for javascript jaquery enable into the site from wordpress
  3. function my_script() {
  4.  
  5. // for main jquery
  6. wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', '1.0');
  7. wp_enqueue_script( 'jquery' );
  8.  
  9. // masonry
  10. wp_enqueue_script('jquery-masonry',array('jquery'));
  11. }
  12.  
  13. add_action('init', 'my_script');
  14.  
  15.  
  16.  
  17. // this is others en queue
  18. function various_my_various_styles(){
  19. global $wp_styles;
  20.  
  21. /*
  22. * Adds JavaScript to pages with the comment form to support
  23. * sites with threaded comments (when in use).
  24. */
  25. if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
  26. wp_enqueue_script( 'comment-reply' );
  27.  
  28. /*Register styles*/
  29.  
  30. // bootstrap min css
  31. wp_register_style( 'bootstrap-min-css', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '1','all' );
  32.  
  33. // bootstrap theme min css
  34. wp_register_style( 'bootstrap-theme-min-css', get_template_directory_uri() . '/css/bootstrap-theme.min.css', array(), '1','all' );
  35.  
  36. // prettyPhoto min css
  37. wp_register_style( 'prettyPhoto-min-css', get_template_directory_uri() . '/css/prettyPhoto.min.css', array(), '1','all' );
  38.  
  39. // meanmenu min css
  40. wp_register_style( 'meanmenu-min-css', get_template_directory_uri() . '/css/meanmenu.min.css', array(), '1','all' );
  41.  
  42. // responsive css
  43. wp_register_style( 'responsive-css', get_template_directory_uri() . '/responsive.css', array(), '1','all' );
  44.  
  45.  
  46.  
  47.  
  48. /*Enqueue styles*/
  49.  
  50. // bootstrap min css
  51. wp_enqueue_style( 'bootstrap-min-css', get_stylesheet_uri(), array( ),'1','all' );
  52.  
  53. // bootstrap theme min css
  54. wp_enqueue_style( 'bootstrap-theme-min-css', get_stylesheet_uri(), array( ),'1','all' );
  55.  
  56. // prettyPhoto min css
  57. wp_enqueue_style( 'prettyPhoto-min-css', get_stylesheet_uri(), array( ),'1','all' );
  58.  
  59. // meanmenu min css
  60. wp_enqueue_style( 'meanmenu-min-css', get_stylesheet_uri(), array( ),'1','all' );
  61.  
  62. // responsive css
  63. wp_enqueue_style( 'responsive-css', get_stylesheet_uri(), array( ),'1','all' );
  64.  
  65.  
  66.  
  67. /* this is the main style css*/
  68. wp_enqueue_style( 'verious-codes-style', get_stylesheet_uri() );
  69.  
  70.  
  71.  
  72.  
  73. // Loading all javascript file here
  74.  
  75.  
  76. // mixitup
  77. wp_enqueue_script( 'jquery-mixitup-min-js', get_template_directory_uri('jquery') . '/js/jquery.mixitup.min.js', array(), '1','0', true );
  78.  
  79. // prettyPhoto
  80. wp_enqueue_script( 'jquery-prettyPhoto-min-js', get_template_directory_uri('jquery') . '/js/jquery.prettyPhoto.min.js', array(), '1','0', true );
  81.  
  82. // jflickrfeed
  83. wp_enqueue_script( 'jquery-jflickrfeed-min-js', get_template_directory_uri('jquery') . '/js/jflickrfeed.min.js', array(), '1','0', true );
  84.  
  85. // jribbble
  86. wp_enqueue_script( 'jquery-jribbble-min-js', get_template_directory_uri('jquery') . '/js/jquery.jribbble-1.0.1.min.js', array(), '1','0', true );
  87.  
  88. // bootstrap-min
  89. wp_enqueue_script( 'bootstrap-min-js', get_template_directory_uri('jquery') . '/js/bootstrap.min.js', array(), '1','0', true );
  90.  
  91. // main js
  92. wp_enqueue_script( 'main-js', get_template_directory_uri('jquery') . '/js/main.js', array(), '1','0', true );
  93. }
  94. add_action('wp_enqueue_scripts','various_my_various_styles');
  95.  
  96.  
  97.  
  98. // html5shiv & respond js IE
  99.  
  100. function my_ie_support_header() {
  101. echo '<!--[if lt IE 9]>'. "\n";
  102. echo '<script src="' . esc_url( get_template_directory_uri() . '/js/html5shiv.js' ) . '"></script>'. "\n";
  103. echo '<script src="' . esc_url( get_template_directory_uri() . '/js/respond.min.js' ) . '"></script>'. "\n";
  104. echo '<![endif]-->'. "\n";
  105. }
  106. add_action( 'wp_head', 'my_ie_support_header' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement