01/15/2016 at 9:46 am
#361302
Keymaster
@ George
Pretty nice!
You need to add an if statement before you output the tab HTML and its content. Something like this should do it.
if ($atts['show_email'] !== '') {
if ( $entry->getEmailAddresses() ) {
echo '';
echo '<input type="radio" name="tabs" id="tab5">';
echo '<label for="tab5">Email</label>';
echo '<div id="tab-content5" class="tab-content animated fadeIn">';
if ( $atts['show_email'] ) echo
$entry->getEmailAddressBlock( array( 'format' => $atts['email_format'] , 'type' => $atts['email_types'] ) );
echo '</div>';
echo '';
}
}
