Guest User

food-restro-pro-customize

a guest
Aug 11th, 2019
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.52 KB | None | 0 0
  1. function food_restro_pro_render_service_section( $content_details = array() ) {
  2.         $options = food_restro_pro_get_theme_options();
  3.         $column = ! empty( $options['service_column'] ) ? $options['service_column'] : 'col-4';
  4.         $i = 1;        
  5.  
  6.         if ( empty( $content_details ) ) {
  7.             return;
  8.         } ?>
  9.  
  10.         <div id="our-services" class="relative page-section">
  11.             <div class="wrapper">
  12.                 <?php if ( ! empty( $options['service_title'] ) || ! empty( $options['service_subtitle'] ) ) : ?>
  13.                     <div class="section-header">
  14.                         <?php if ( ! empty( $options['service_subtitle'] ) ) : ?>
  15.                             <p class="section-subtitle"><?php echo esc_html( $options['service_subtitle'] ); ?></p>
  16.                         <?php endif;
  17.  
  18.                         if ( ! empty( $options['service_title'] ) ) : ?>
  19.                             <h2 class="section-title"><?php echo esc_html( $options['service_title'] ); ?></h2>
  20.                         <?php endif; ?>
  21.                     </div><!-- .section-header -->
  22.                 <?php endif; ?>
  23.  
  24.                 <!-- supports col-2,col-3,col-4  -->
  25.                 <div class="section-content <?php echo esc_attr( $column ); ?>">
  26.                     <?php foreach ( $content_details as $content ) : ?>
  27.                         <article class="hentry">
  28.                             <div class="icon-container">
  29.                                 <a href="<?php echo esc_url( $content['url'] ); ?>">
  30.                                     <i class="fa fa-2x <?php echo ! empty( $options['service_content_icon_' . $i] ) ? esc_attr( $options['service_content_icon_' . $i] ) : 'fa-cogs'; ?>"></i>
  31.                                 </a>
  32.                             </div><!-- .icon-container -->
  33.                             <header class="entry-header">
  34.                                 <h2 class="entry-title"><a href="<?php echo esc_url( $content['url'] ); ?>"><?php echo esc_html( $content['title'] ); ?></h2>
  35.                             </header>
  36.                             <div class="entry-content">
  37.                                 <?php echo esc_html( $content['excerpt'] ); ?>
  38.                             </div><!-- .entry-content -->
  39.                             </a>
  40.                         </article><!-- .hentry -->
  41.                     <?php $i++; endforeach; ?>
  42.                 </div><!-- .entry-content -->
  43.             </div><!-- .wrapper -->
  44.         </div><!-- #our-services-->
  45.        
  46.     <?php }
Advertisement
Add Comment
Please, Sign In to add comment