Guest User

Untitled

a guest
Apr 1st, 2019
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. function pet_business_pro_render_project_section( $content_details = array() ) {
  2. $options = pet_business_pro_get_theme_options();
  3. $project_content_type = $options['project_content_type'];
  4.  
  5. if ( empty( $content_details ) ) {
  6. return;
  7. } ?>
  8.  
  9. <div id="latest-projects" class="relative page-section">
  10. <div class="wrapper">
  11. <div class="section-header">
  12. <?php if ( ! empty( $options['project_title'] ) ) : ?>
  13. <h2 class="section-title"><?php echo esc_html( $options['project_title'] ); ?></h2>
  14. <?php endif; ?>
  15. <?php if ( ! empty( $options['project_sub_title'] ) ) : ?>
  16. <p class="section-subtitle"><?php echo esc_html( $options['project_sub_title'] ); ?></p>
  17. <?php endif; ?>
  18. </div><!-- .section-header -->
  19.  
  20. <div class="project-slider" data-slick='{"slidesToShow": 4, "slidesToScroll": 1, "infinite": true, "speed": 1500, "dots": false, "arrows":true, "autoplay": true, "fade": false }'>
  21. <?php
  22. $i = 1;
  23. foreach ( $content_details as $content ) :
  24. ?>
  25. <article style="background-image: url('<?php echo esc_url( $content['image'] ); ?>');">
  26. <div class="overlay"></div>
  27. <div class="entry-container">
  28. <div class="entry-container">
  29. <?php if ( ! empty( $content['title'] ) ) : ?>
  30. <header class="entry-header">
  31. <h2 class="entry-title"><a href="<?php echo esc_url( $content['url'] ); ?>"><?php echo esc_html( $content['title'] ); ?></a></h2>
  32. </header>
  33. <?php endif; ?>
  34. <div class="entry-meta">
  35. <span class="cat-links">
  36. <?php
  37. if ( 'page' !== $project_content_type ) {
  38. $categories_list = get_the_category_list( esc_html__( ', ', 'pet-business-pro' ), '', $content['id'] );
  39. echo $categories_list; // WPCS: XSS OK.
  40. } else {
  41. if ( ! empty( $options['project_custom_meta_' . $i] ) ) {
  42. echo esc_html( $options['project_custom_meta_' . $i] );
  43. }
  44. }
  45. ?>
  46. </span>
  47. </div><!-- .entry-meta -->
  48. </div><!-- .entry-container -->
  49. </div><!-- .entry-container -->
  50. </article>
  51. <?php
  52. $i++;
  53. endforeach; ?>
  54. </div><!-- .section-content -->
  55. </div><!-- .wrapper -->
  56. </div><!-- #project-experience -->
  57.  
  58. <?php }
Advertisement
Add Comment
Please, Sign In to add comment