| @@ -1,32 +1,35 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | - exit; // Exit if accessed directly | |
| 3 | + exit; | |
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | \ABlocks\Helper::get_template( 'email/template-header.php' ); |
| 7 | 7 | ?> |
| 8 | 8 | <div class="ablocks-container"> |
| 9 | - <div class="ablocks-content"> | |
| 9 | + <div class="ablocks-content"> | |
| 10 | 10 | <div class="ablocks-wrapper"> |
| 11 | - <h5 class="ablocks-main-heading"><?php esc_html_e( 'New Contact Form Submission', 'ablocks' ); ?></h5> | |
| 11 | + | |
| 12 | 12 | <div class="ablocks-entry-content"> |
| 13 | - <h2><?php esc_html_e( 'You have a new contact form submission!', 'ablocks' ); ?></h2> | |
| 14 | - <p><strong><?php esc_html_e( 'Email:', 'ablocks' ); ?></strong> <?php echo esc_html( $email ); ?></p> | |
| 15 | - <p><strong><?php esc_html_e( 'Message:', 'ablocks' ); ?></strong></p> | |
| 16 | 13 | <p><?php echo wp_kses_post( $message ); ?></p> |
| 17 | - <p><a href="<?php echo esc_url( get_admin_url() ); ?>"><?php esc_html_e( 'Login to your admin panel to view the submission.', 'ablocks' ); ?></a></p> | |
| 18 | 14 | </div> |
| 15 | + | |
| 19 | 16 | <div class="ablocks-footer"> |
| 20 | - © <?php | |
| 21 | - $url = wp_parse_url( get_bloginfo( 'url' ) ); | |
| 22 | - echo sanitize_text_field( $url['host'] . ':' . $url['port'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 17 | + © | |
| 18 | + <?php | |
| 19 | + $site_url = wp_parse_url( get_bloginfo( 'url' ) ); | |
| 20 | + | |
| 21 | + if ( ! empty( $site_url['host'] ) ) { | |
| 22 | + echo esc_html( $site_url['host'] ); | |
| 23 | + | |
| 24 | + if ( ! empty( $site_url['port'] ) ) { | |
| 25 | + echo ':' . esc_html( $site_url['port'] ); | |
| 26 | + } | |
| 27 | + } | |
| 23 | 28 | ?> |
| 24 | - <?php // echo wp_kses_post( $footer ); | |
| 25 | - // phpcs::ignore Squiz.PHP.CommentedOutCode.Found | |
| 26 | - ?> | |
| 27 | 29 | </div> |
| 28 | - </td> | |
| 30 | + | |
| 31 | + </div> | |
| 29 | 32 | </div> |
| 30 | 33 | </div> |
| 31 | 34 | <?php |
| 32 | - \ABlocks\Helper::get_template( 'email/template-footer.php' ); | |
| 35 | +\ABlocks\Helper::get_template( 'email/template-footer.php' ); | |