Skip to content

Instantly share code, notes, and snippets.

@farookibrahim
Last active February 10, 2016 14:43
Show Gist options
  • Select an option

  • Save farookibrahim/6f3d29bc6d8acbc40757 to your computer and use it in GitHub Desktop.

Select an option

Save farookibrahim/6f3d29bc6d8acbc40757 to your computer and use it in GitHub Desktop.
Unicase Custom Header Info Content
add_filter( 'unicase_header_contact_info', 'custom_apply_header_contact_info', 20 );
function custom_apply_header_contact_info( $info ) {
global $unicase_options;
if ( !empty( $unicase_options['header_support_phone'] ) || !empty( $unicase_options['header_support_email'] ) ) :
ob_start();
?>
<div class="contact-row">
<?php if( !empty( $unicase_options['header_support_phone'] ) ) : ?>
<div class="phone inline">
<i class="fa fa-phone"></i> <a href="tel:<?php echo esc_attr( $unicase_options['header_support_phone'] ); ?>"><?php echo esc_html( $unicase_options['header_support_phone'] ); ?></a>
</div>
<?php endif; ?>
<?php if( !empty( $unicase_options['header_support_email'] ) ) : ?>
<div class="contact inline">
<i class="fa fa-envelope"></i> <a href="mailto:<?php echo esc_attr( $unicase_options['header_support_email'] ); ?>"><?php echo esc_html( $unicase_options['header_support_email'] ); ?></a>
</div>
<?php endif; ?>
</div><!-- /.contact-row -->
<?php
$info = ob_get_clean();
endif;
return $info;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment