Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function kids_education_pro_render_features_section( $content_details = array() ) {
- $options = kids_education_pro_get_theme_options();
- $features_title = !empty( $options['features_section_title'] ) ? $options['features_section_title'] : '';
- $features_description = !empty( $options['features_section_description'] ) ? $options['features_section_description'] : '';
- $features_layout = !empty( $options['features_section_layout'] ) ? $options['features_section_layout'] : 'four-columns';
- $background_property = $options['features_background_property'];
- $background_css = !empty( $options['features_background_image'] ) ? 'style="background-image:url('. esc_url( $options['features_background_image'] ) .')"' : '';
- if( 'background_color' == $background_property ){
- $background_css = !empty( $options['features_background_color'] ) ? 'style="background-color:'. esc_attr( $options['features_background_color'] ) .'"' : '';
- }
- if ( empty( $content_details ) ) {
- return;
- } ?>
- <section id="features" class="page-section os-animation" data-os-animation="fadeInUp" <?php echo $background_css;?>>
- <div class="container">
- <header class="entry-header">
- <?php if( $features_title ){ ?>
- <h2 class="entry-title"><?php echo esc_html( $features_title );?></h2>
- <?php }
- if( !empty( $features_description ) ){ ?>
- <p class="sub-title"><?php echo esc_html( $features_description ); ?></p>
- <?php } ?>
- </header><!-- .entry-header -->
- <div class="entry-content <?php echo esc_attr( $features_layout ); ?>">
- <?php foreach ($content_details as $content_detail ) : ?>
- <div class="column-wrapper">
- <div class="featured-item">
- <?php if( !empty( $content_detail['icon'] ) ){ ?>
- <div class="icon-container">
- <i class="fa <?php echo esc_attr( $content_detail['icon'] ); ?>"></i>
- </div><!-- .icon-container -->
- <?php } ?>
- <h5 class="title"><a href="<?php echo esc_url( $content_detail['url'] );?>"><?php echo esc_html( $content_detail['title'] );?></a></h5>
- <a href="<?php the_permalink(); ?>">
- <?php if( !empty( $content_detail['excerpt'] ) ){
- echo '<p>'. esc_html( $content_detail['excerpt'] ) . '</p>';
- } ?>
- </a>
- </div><!-- .featured-item -->
- </div><!-- .column-wrapper -->
- <?php endforeach; ?>
- </div><!-- .entry-content -->
- </div><!-- .container -->
- </section><!-- #features -->
- <?php
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement