这确实是一个普通的PHP/HTML问题,但它的价值在于:
<?php if ( $email = get_post_meta( $order->id, \'_billing_email\', true ) ) : ?>
<li>
<span><?php _e( \'Email:\', \'dokan\' ); ?></span>
<a href="mailto:<?php echo esc_attr( $email ) ?>"><?php echo esc_html( $email ) ?></a>
</li>
<?php endif ?>
<?php if ( $phone = get_post_meta( $order->id, \'_billing_phone\', true ) ) : ?>
<li>
<span><?php _e( \'Phone:\', \'dokan\' ) ?></span>
<a href="tel:<?php echo esc_attr( $phone ) ?>"><?php echo esc_html( $phone ) ?></a>
</li>
<?php endif ?>