<?php
/**
 * The component for displaying site social icons in the footer
 *
 * @package Reach
 */

use Reach\App\Fields\SiteOptions;

$options = SiteOptions::getSiteOptions();
  // get company contact info
  $company_address                = ! empty( $options['privacy_company_address'] ) ? '<span>' . esc_html($options['privacy_company_address']) . '</span>' : '';
  $company_phone                  = ! empty( $options['privacy_company_number'] )  ? '<span>' . esc_html($options['privacy_company_number']) . '</span>' : '';
  $company_email                  = ! empty( $options['email_address'] )           ? '<span><a href="mailto:' . esc_attr($options['email_address']) .'">' . esc_attr($options['email_address']) . '</a></span>': '';
  $contact                        = $company_address . $company_phone . $company_email;

 //override contact if set
 $coustom_contact                 =   ! empty( $options['footer_custom_contact'] ) ? $contact = wpautop($options['footer_custom_contact']) : '';

 ?>

 <div class="footer__contact">
   <?php echo $contact; ?>
 </div>
