// make sure google maps has a valid address field before showing tab
$custom_fields = get_post_custom();
if ( ! empty( $custom_fields['cp_zipcode'] ) || ! empty( $custom_fields['cp_country'] ) ||
! empty( $custom_fields['cp_state'] ) || ! empty( $custom_fields['cp_city'] ) ||
! empty( $custom_fields['cp_street'] ) ) {
$gmap_active = true;
}
// make sure google maps has a valid address field before showing tab
$gmap_active = false;
$custom_fields = get_post_custom();
$_fields = array("cp_zipcode", "cp_country", "cp_state", "cp_street", "cp_city");
foreach ($_fields as $i) {
if (! empty( $custom_fields[$i] ) && ! empty( $custom_fields[$i][0] )) {
$gmap_active = true;
break;
}
}
There are currently 1 users browsing this thread. (0 members and 1 guests)