Ei kuvausta

summary-body.php 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <?php
  2. /**
  3. * Email Summary body template.
  4. *
  5. * This template can be overridden by copying it to yourtheme/wpforms/emails/summary-body.php.
  6. *
  7. * @since 1.5.4
  8. *
  9. * @version 1.5.4
  10. *
  11. * @var array $entries
  12. * @var array $info_block
  13. */
  14. if ( ! defined( 'ABSPATH' ) ) {
  15. exit;
  16. }
  17. ?>
  18. <table class="summary-container">
  19. <tbody>
  20. <tr>
  21. <td>
  22. <h6 class="greeting"><?php esc_html_e( 'Hi there!', 'wpforms-lite' ); ?></h6>
  23. <?php if ( wpforms()->pro ) : ?>
  24. <p class="large"><?php esc_html_e( 'Let’s see how your forms performed in the past week.', 'wpforms-lite' ); ?></p>
  25. <?php else : ?>
  26. <p class="large"><?php esc_html_e( 'Let’s see how your forms performed.', 'wpforms-lite' ); ?></p>
  27. <p class="lite-disclaimer">
  28. <?php
  29. echo wp_kses(
  30. __( 'Below is the total number of submissions for each form, <strong>however actual entries are not stored by WPForms Lite</strong>.', 'wpforms-lite' ),
  31. [
  32. 'strong' => [],
  33. ]
  34. );
  35. ?>
  36. </p>
  37. <p class="lite-disclaimer">
  38. <?php esc_html_e( 'To generate detailed reports and view future entries inside your WordPress dashboard, consider upgrading to Pro.', 'wpforms-lite' ); ?>
  39. </p>
  40. <?php endif; ?>
  41. <table class="email-summaries">
  42. <thead>
  43. <tr>
  44. <th><?php esc_html_e( 'Form', 'wpforms-lite' ); ?></th>
  45. <th class="entries-column text-center"><?php esc_html_e( 'Entries', 'wpforms-lite' ); ?></th>
  46. </tr>
  47. </thead>
  48. <tbody>
  49. <?php foreach ( $entries as $row ) : ?>
  50. <tr>
  51. <td class="text-large"><?php echo isset( $row['title'] ) ? esc_html( $row['title'] ) : ''; ?></td>
  52. <td class="entry-count text-large">
  53. <?php if ( empty( $row['edit_url'] ) ) : ?>
  54. <span>
  55. <?php echo isset( $row['count'] ) ? absint( $row['count'] ) : ''; ?>
  56. </span>
  57. <?php else : ?>
  58. <a href="<?php echo esc_url( $row['edit_url'] ); ?>">
  59. <?php echo isset( $row['count'] ) ? absint( $row['count'] ) : ''; ?>
  60. </a>
  61. <?php endif; ?>
  62. </td>
  63. </tr>
  64. <?php endforeach; ?>
  65. <?php if ( empty( $entries ) ) : ?>
  66. <tr>
  67. <td class="text-center" colspan="2"><?php esc_html_e( 'It appears you do not have any form entries yet.', 'wpforms-lite' ); ?></td>
  68. </tr>
  69. <?php endif; ?>
  70. </tbody>
  71. </table>
  72. <?php if ( ! empty( $info_block ) ) : ?>
  73. <table class="summary-info-table">
  74. <?php if ( ! empty( $info_block['title'] ) || ! empty( $info_block['content'] ) ) : ?>
  75. <tr>
  76. <td class="summary-info-content">
  77. <table>
  78. <?php if ( ! empty( $info_block['title'] ) ) : ?>
  79. <tr>
  80. <td class="text-center">
  81. <h6><?php echo esc_html( $info_block['title'] ); ?></h6>
  82. </td>
  83. </tr>
  84. <?php endif; ?>
  85. <?php if ( ! empty( $info_block['content'] ) ) : ?>
  86. <tr>
  87. <td class="text-center"><?php echo wp_kses_post( $info_block['content'] ); ?></td>
  88. </tr>
  89. <?php endif; ?>
  90. </table>
  91. </td>
  92. </tr>
  93. <?php endif; ?>
  94. <?php if ( ! empty( $info_block['url'] ) && ! empty( $info_block['button'] ) ) : ?>
  95. <tr>
  96. <td class="summary-info-content button-container">
  97. <center>
  98. <table class="button rounded-button">
  99. <tr>
  100. <td>
  101. <table>
  102. <tr>
  103. <td>
  104. <a href="<?php echo esc_url( $info_block['url'] ); ?>" rel="noopener noreferrer" target="_blank">
  105. <?php echo esc_html( $info_block['button'] ); ?>
  106. </a>
  107. </td>
  108. </tr>
  109. </table>
  110. </td>
  111. </tr>
  112. </table>
  113. </center>
  114. </td>
  115. </tr>
  116. <?php endif; ?>
  117. </table>
  118. <?php endif; ?>
  119. </td>
  120. </tr>
  121. </tbody>
  122. </table>