document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php
  2. global $graphene_settings;
  3. /**
  4. * Prints out the scripts required for the featured posts slider
  5. */
  6. if ( ! function_exists( 'graphene_scrollable' ) ) :
  7. function graphene_scrollable() {
  8. global $graphene_settings;
  9.  
  10. $interval = ( $graphene_settings['slider_speed'] ) ? $graphene_settings['slider_speed'] : 7000;
  11. $speed = $graphene_settings['slider_trans_speed'];
  12. ?>
  13. <!-- Scrollable -->
  14. <script type="text/javascript">
  15. //<![CDATA[
  16. jQuery(document).ready(function($){
  17.  
  18. <?php if ( $graphene_settings['slider_animation'] == 'horizontal-slide' ) : ?>
  19. $("#slider_root")
  20. .scrollable({
  21. circular: true,
  22. clickable: false,
  23. speed: <?php echo $speed; ?>
  24. })
  25. .navigator({
  26. navi: '.slider_nav',
  27. naviItem: 'a',
  28. activeClass: 'active'
  29. })
  30. .autoscroll({
  31. interval: <?php echo $interval; ?>,
  32. steps: 1,
  33. api: 'true'
  34. });
  35. $.graphene_slider = $("#slider_root").data("scrollable");
  36.  
  37. <?php else :
  38. if ( $graphene_settings['slider_animation'] == 'vertical-slide' ){
  39. $effect = 'slide';
  40. }
  41. if ( $graphene_settings['slider_animation'] == 'fade' ){
  42. $effect = 'fade';
  43. }
  44. if ( $graphene_settings['slider_animation'] == 'none' ){
  45. $effect = 'default';
  46. }
  47. ?>
  48.  
  49. $( ".slider_nav" )
  50. .tabs( ".slider_items > .slider_post", {
  51. effect: '<?php echo $effect; ?>',
  52. fadeOutSpeed: <?php echo $speed; ?>,
  53. fadeInSpeed: <?php echo $speed; ?>,
  54. rotate: true,
  55. current: 'active'
  56. })
  57. .slideshow({
  58. autoplay: true,
  59. clickable: false,
  60. interval: <?php echo $interval; ?>,
  61. api: true
  62. });
  63. $.graphene_slider = $(".slider_nav").data("tabs");
  64. <?php endif; ?>
  65.  
  66. <?php do_action( 'graphene_scrollable_script' ); ?>
  67. });
  68. //]]>
  69. </script>
  70. <!-- #Scrollable -->
  71. <?php
  72. }
  73. endif;
  74.  
  75. /**
  76. * Creates the functions that output the slider
  77. */
  78. function graphene_slider(){
  79. global $graphene_settings, $graphene_in_slider;
  80.  
  81. $graphene_in_slider = true;
  82. if ( $graphene_settings['slider_display_style'] == 'bgimage-excerpt' )
  83. graphene_set_excerpt_length( 35 );
  84.  
  85. do_action( 'graphene_before_slider' ); ?>
  86. <?php
  87. /* Generate classes for the slider wrapper */
  88. $class = array( 'featured_slider', 'clearfix' );
  89. $class[] = $graphene_settings['slider_display_style'];
  90. $class[] = $graphene_settings['slider_animation'];
  91.  
  92. /* For backward compatibility */
  93. if ( $graphene_settings['slider_display_style'] == 'bgimage-excerpt' )
  94. $class[] = 'full-sized';
  95.  
  96. $class = apply_filters( 'graphene_slider_class', $class );
  97. $class = implode( ' ', $class );
  98. ?>
  99. <div class="<?php echo $class; ?>">
  100. <?php do_action( 'graphene_before_slider_root' ); ?>
  101. <div id="slider_root" class="clearfix">
  102. <?php do_action( 'graphene_before_slideritems' ); ?>
  103. <div class="slider_items">
  104. <?php
  105. /* Get the posts to be displayed */
  106. $sliderposts = graphene_get_slider_posts();
  107.  
  108. /* Display each post in the slider */
  109. $slidernav_html = '';
  110. $i = 0;
  111. while ( $sliderposts->have_posts() ) : $sliderposts->the_post();
  112.  
  113. $style = '';
  114. /* Slider background image*/
  115. if ( $graphene_settings['slider_display_style'] == 'bgimage-excerpt' ) {
  116. $image = graphene_get_slider_image( get_the_ID(), 'graphene_slider', true);
');