Advertisement
Guest User

dana-abadi

a guest
Nov 22nd, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.98 KB | None | 0 0
  1. <?php
  2. /**
  3. * Template used for pages.
  4. *
  5. * @package Avada
  6. * @subpackage Templates
  7. */
  8.  
  9. // Do not allow directly accessing this file.
  10. if ( ! defined( 'ABSPATH' ) ) {
  11. exit( 'Direct script access denied.' );
  12. }
  13. wp_enqueue_script('dananu_main_script', plugins_url('dananu/assets/js/main.js'), array(), '1.12.0',true);
  14. wp_enqueue_style('dananu_style', plugins_url('dananu/assets/css/style.css'), array(), '1.0');
  15. ?>
  16. <?php get_header(); ?>
  17. <section id="content" <?php Avada()->layout->add_style( 'content_style' ); ?>>
  18. <?php while ( have_posts() ) : the_post(); ?>
  19. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  20. <?php echo fusion_render_rich_snippets_for_pages(); // WPCS: XSS ok. ?>
  21. <?php if ( ! post_password_required( $post->ID ) ) : ?>
  22. <?php if ( Avada()->settings->get( 'featured_images_pages' ) ) : ?>
  23. <?php if ( 0 < avada_number_of_featured_images() || get_post_meta( $post->ID, 'pyre_video', true ) ) : ?>
  24. <div class="fusion-flexslider flexslider post-slideshow">
  25. <ul class="slides">
  26. <?php if ( get_post_meta( $post->ID, 'pyre_video', true ) ) : ?>
  27. <li>
  28. <div class="full-video">
  29. <?php echo get_post_meta( $post->ID, 'pyre_video', true ); // WPCS: XSS ok. ?>
  30. </div>
  31. </li>
  32. <?php endif; ?>
  33. <?php if ( has_post_thumbnail() && 'yes' != get_post_meta( $post->ID, 'pyre_show_first_featured_image', true ) ) : ?>
  34. <?php $attachment_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ); ?>
  35. <?php $full_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' ); ?>
  36. <?php $attachment_data = wp_get_attachment_metadata( get_post_thumbnail_id() ); ?>
  37. <li>
  38. <a href="<?php echo esc_url_raw( $full_image[0] ); ?>" data-rel="iLightbox[gallery<?php the_ID(); ?>]" title="<?php echo esc_attr( get_post_field( 'post_excerpt', get_post_thumbnail_id() ) ); ?>" data-title="<?php echo esc_attr( get_post_field( 'post_title', get_post_thumbnail_id() ) ); ?>" data-caption="<?php echo esc_attr( get_post_field( 'post_excerpt', get_post_thumbnail_id() ) ); ?>">
  39. <img src="<?php echo esc_url_raw( $attachment_image[0] ); ?>" alt="<?php echo esc_attr( get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true ) ); ?>" role="presentation" />
  40. </a>
  41. </li>
  42. <?php endif; ?>
  43. <?php $i = 2; ?>
  44. <?php while ( $i <= Avada()->settings->get( 'posts_slideshow_number' ) ) : ?>
  45. <?php $attachment_new_id = fusion_get_featured_image_id( 'featured-image-' . $i, 'page' ); ?>
  46. <?php if ( $attachment_new_id ) : ?>
  47. <?php $attachment_image = wp_get_attachment_image_src( $attachment_new_id, 'full' ); ?>
  48. <?php $full_image = wp_get_attachment_image_src( $attachment_new_id, 'full' ); ?>
  49. <?php $attachment_data = wp_get_attachment_metadata( $attachment_new_id ); ?>
  50. <li>
  51. <a href="<?php echo esc_url_raw( $full_image[0] ); ?>" data-rel="iLightbox[gallery<?php the_ID(); ?>]" title="<?php echo esc_attr( get_post_field( 'post_excerpt', $attachment_new_id ) ); ?>" data-title="<?php echo esc_attr( get_post_field( 'post_title', $attachment_new_id ) ); ?>" data-caption="<?php echo esc_attr( get_post_field( 'post_excerpt', $attachment_new_id ) ); ?>">
  52. <img src="<?php echo esc_url_raw( $attachment_image[0] ); ?>" alt="<?php echo esc_attr( get_post_meta( $attachment_new_id, '_wp_attachment_image_alt', true ) ); ?>" role="presentation" />
  53. </a>
  54. </li>
  55. <?php endif; ?>
  56. <?php $i++; ?>
  57. <?php endwhile; ?>
  58. </ul>
  59. </div>
  60. <?php endif; ?>
  61. <?php endif; ?>
  62. <?php endif; // Password check. ?>
  63.  
  64. <div class="post-content">
  65.  
  66. <div class="col-sm-8 col-sm-offset-2" style="padding-top:30px;padding-bottom:60px;">
  67. <h3 class="blue-heading"><?php the_title();?></h3>
  68. <?php the_content(); ?>
  69. <form action="<?php echo esc_url( admin_url('admin-post.php') ); ?>" method="post">
  70. <input type="hidden" id="min-amount" name="min_amount" value="<?php echo get_option('dananu_minimal_amount_dana_abadi',50000);?>" />
  71. <input type="hidden" name="action" value="dananu_donate" />
  72. <input type="hidden" name="donate_type" value="dana_abadi" />
  73. <div class="amount_input">
  74. <div class=" col-md-12">
  75. <div class="col-md-6">
  76. <span class="rp_text">Rp.</span>
  77. <span class="error_text">Donasi minimal Rp. <?php echo get_option('dananu_minimal_amount_dana_abadi',50000);?></span>
  78. <input type="text" name="amount_value2" class="form_imput_dana-abadi insert_amount" value="" style="" placeholder="Masukkan jumlah donasi dana abadi Anda" required="">
  79. </div>
  80. <div class="col-md-6">
  81. <input type="submit" value="Lanjutkan" class="button_send tombol_send_dana-abadi" style="">
  82. </div>
  83. </div>
  84.  
  85. </div><br>
  86.  
  87.  
  88. </form>
  89. </div>
  90.  
  91. <?php fusion_link_pages(); ?>
  92. </div>
  93. <?php if ( ! post_password_required( $post->ID ) ) : ?>
  94. <?php if ( class_exists( 'WooCommerce' ) ) : ?>
  95. <?php $woo_thanks_page_id = get_option( 'woocommerce_thanks_page_id' ); ?>
  96. <?php $is_woo_thanks_page = ( ! get_option( 'woocommerce_thanks_page_id' ) ) ? false : is_page( get_option( 'woocommerce_thanks_page_id' ) ); ?>
  97. <?php if ( Avada()->settings->get( 'comments_pages' ) && ! is_cart() && ! is_checkout() && ! is_account_page() && ! $is_woo_thanks_page ) : ?>
  98. <?php wp_reset_postdata(); ?>
  99. <?php comments_template(); ?>
  100. <?php endif; ?>
  101. <?php else : ?>
  102. <?php if ( Avada()->settings->get( 'comments_pages' ) ) : ?>
  103. <?php wp_reset_postdata(); ?>
  104. <?php comments_template(); ?>
  105. <?php endif; ?>
  106. <?php endif; ?>
  107. <?php endif; // Password check. ?>
  108. </div>
  109. <?php endwhile; ?>
  110. <?php wp_reset_postdata(); ?>
  111. </section>
  112. <?php do_action( 'avada_after_content' ); ?>
  113. <?php get_footer();
  114.  
  115. /* Omit closing PHP tag to avoid "Headers already sent" issues. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement