Advertisement
Guest User

wp-travel-customize

a guest
Apr 17th, 2019
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.10 KB | None | 0 0
  1. function kids_education_pro_render_features_section( $content_details = array() ) {
  2.         $options              = kids_education_pro_get_theme_options();
  3.         $features_title       = !empty( $options['features_section_title'] ) ?  $options['features_section_title'] : '';
  4.         $features_description = !empty( $options['features_section_description'] ) ? $options['features_section_description'] : '';
  5.         $features_layout =  !empty( $options['features_section_layout'] ) ? $options['features_section_layout'] : 'four-columns';
  6.  
  7.         $background_property = $options['features_background_property'];
  8.         $background_css      = !empty( $options['features_background_image'] ) ? 'style="background-image:url('.  esc_url( $options['features_background_image'] ) .')"' : '';
  9.  
  10.         if( 'background_color' == $background_property ){
  11.           $background_css = !empty( $options['features_background_color'] ) ? 'style="background-color:'.  esc_attr( $options['features_background_color'] ) .'"' : '';
  12.         }
  13.  
  14.         if ( empty( $content_details ) ) {
  15.           return;
  16.         } ?>
  17.         <section id="features" class="page-section os-animation" data-os-animation="fadeInUp" <?php echo $background_css;?>>
  18.             <div class="container">
  19.                 <header class="entry-header">
  20.                 <?php if( $features_title ){ ?>
  21.                     <h2 class="entry-title"><?php echo esc_html( $features_title );?></h2>
  22.                 <?php }
  23.                     if( !empty( $features_description ) ){  ?>
  24.                     <p class="sub-title"><?php echo esc_html( $features_description ); ?></p>
  25.                 <?php } ?>
  26.                 </header><!-- .entry-header -->
  27.  
  28.                 <div class="entry-content <?php echo esc_attr( $features_layout ); ?>">
  29.  
  30.                     <?php foreach ($content_details as $content_detail ) : ?>
  31.                         <div class="column-wrapper">
  32.  
  33.                             <div class="featured-item">
  34.                             <?php if( !empty( $content_detail['icon'] ) ){ ?>
  35.                                 <div class="icon-container">
  36.                                     <i class="fa <?php echo esc_attr( $content_detail['icon'] ); ?>"></i>
  37.                                 </div><!-- .icon-container -->
  38.                                 <?php } ?>
  39.                                 <h5 class="title"><a href="<?php echo esc_url( $content_detail['url'] );?>"><?php echo esc_html( $content_detail['title'] );?></a></h5>
  40.                           <a href="<?php the_permalink(); ?>">
  41.                                 <?php if( !empty( $content_detail['excerpt'] ) ){
  42.                                     echo '<p>'. esc_html( $content_detail['excerpt'] ) . '</p>';
  43.                                 } ?>    
  44.                         </a>  
  45.                             </div><!-- .featured-item -->        
  46.                         </div><!-- .column-wrapper -->
  47.                     <?php endforeach; ?>
  48.  
  49.                 </div><!-- .entry-content -->
  50.             </div><!-- .container -->
  51.         </section><!-- #features -->
  52.        
  53. <?php
  54.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement