first commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* General body template (plain text).
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/wpforms/emails/general-body-plain.php.
|
||||
*
|
||||
* @since 1.5.4
|
||||
*
|
||||
* @version 1.5.4
|
||||
*
|
||||
* @var string $message
|
||||
*/
|
||||
|
||||
if ( ! \defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
echo \wp_kses_post( $message );
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* General body template.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/wpforms/emails/general-body.php.
|
||||
*
|
||||
* @since 1.5.4
|
||||
*
|
||||
* @version 1.5.4
|
||||
*
|
||||
* @var string $message
|
||||
*/
|
||||
|
||||
if ( ! \defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo \wp_kses_post( $message ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* General footer template.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/wpforms/emails/general-footer.php.
|
||||
*
|
||||
* @since 1.5.4
|
||||
*
|
||||
* @version 1.5.4
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" class="footer">
|
||||
<?php
|
||||
/* translators: %s - link to a site. */
|
||||
printf( esc_html__( 'Sent from %s', 'wpforms-lite' ), '<a href="' . esc_url( home_url() ) . '">' . esc_html( wp_specialchars_decode( get_bloginfo( 'name' ) ) ) . '</a>' );
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* General header template.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/wpforms/emails/general-header.php.
|
||||
*
|
||||
* @since 1.5.4
|
||||
*
|
||||
* @version 1.5.4
|
||||
*
|
||||
* @var string $title
|
||||
* @var string $header_image
|
||||
*/
|
||||
|
||||
if ( ! \defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title><?php echo \esc_html( $title ); ?></title>
|
||||
</head>
|
||||
<body>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" class="body">
|
||||
<tr>
|
||||
<td align="center" valign="top" class="body-inner">
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="container">
|
||||
<tr>
|
||||
<td align="center" valign="middle" class="header">
|
||||
<?php if ( ! empty( $header_image['url'] ) ) : ?>
|
||||
<img src="<?php echo \esc_url( $header_image['url'] ); ?>" <?php echo isset( $header_image['width'] ) ? 'width="' . \absint( $header_image['width'] ) . '"' : ''; ?> alt="<?php echo \esc_attr( \get_bloginfo( 'name' ) ); ?>" />
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top" class="content">
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* General media queries style template.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/wpforms/emails/general-queries.php.
|
||||
*
|
||||
* @since 1.5.4
|
||||
*
|
||||
* @version 1.5.4
|
||||
*/
|
||||
|
||||
if ( ! \defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
require \WPFORMS_PLUGIN_DIR . 'assets/css/emails/partials/media_queries.css';
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* General style template.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/wpforms/emails/general-style.php.
|
||||
*
|
||||
* @since 1.5.4
|
||||
*
|
||||
* @version 1.5.4
|
||||
*
|
||||
* @var string $email_background_color
|
||||
*/
|
||||
|
||||
if ( ! \defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
require \WPFORMS_PLUGIN_DIR . '/assets/css/emails/general.min.css';
|
||||
|
||||
?>
|
||||
|
||||
body, .body {
|
||||
background-color: <?php echo \esc_attr( $email_background_color ); ?>;
|
||||
}
|
||||
|
||||
<?php if ( ! empty( $header_image_max_width ) ) : ?>
|
||||
.header img {
|
||||
max-width: <?php echo \esc_attr( $header_image_max_width ); ?>;
|
||||
}
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* Email Summary body template (plain text).
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/wpforms/emails/summary-body-plain.php.
|
||||
*
|
||||
* @since 1.5.4
|
||||
*
|
||||
* @version 1.5.4
|
||||
*
|
||||
* @var array $entries
|
||||
* @var array $info_block
|
||||
*/
|
||||
|
||||
if ( ! \defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
echo \esc_html__( 'Hi there!', 'wpforms-lite' ) . "\n\n";
|
||||
|
||||
if ( \wpforms()->pro ) {
|
||||
echo \esc_html__( 'Let’s see how your forms performed in the past week.', 'wpforms-lite' ) . "\n\n";
|
||||
} else {
|
||||
echo \esc_html__( 'Let’s see how your forms performed.', 'wpforms-lite' ) . "\n\n";
|
||||
echo \esc_html__( 'Below is the total number of submissions for each form, however actual entries are not stored in WPForms Lite. To generate detailed reports and view future entries inside your WordPress dashboard, consider upgrading to Pro.', 'wpforms-lite' ) . "\n\n\n";
|
||||
}
|
||||
|
||||
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
||||
|
||||
echo \esc_html__( 'Form', 'wpforms-lite' ) . ' | ' . esc_html__( 'Entries', 'wpforms-lite' ) . "\n\n";
|
||||
|
||||
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
|
||||
|
||||
foreach ( $entries as $row ) {
|
||||
echo ( isset( $row['title'] ) ? \esc_html( $row['title'] ) : '' ) . ' | ' . ( isset( $row['count'] ) ? \absint( $row['count'] ) : '' ) . "\n\n";
|
||||
}
|
||||
|
||||
if ( empty( $entries ) ) {
|
||||
echo \esc_html__( 'It appears you do not have any form entries yet.', 'wpforms-lite' ) . "\n\n";
|
||||
}
|
||||
|
||||
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n\n";
|
||||
|
||||
if ( ! empty( $info_block['title'] ) ) {
|
||||
echo \esc_html( $info_block['title'] ) . "\n\n";
|
||||
}
|
||||
|
||||
if ( ! empty( $info_block['content'] ) ) {
|
||||
echo \wp_kses_post( $info_block['content'] ) . "\n\n";
|
||||
}
|
||||
|
||||
if ( ! empty( $info_block['button'] ) && ! empty( $info_block['url'] ) ) {
|
||||
echo \esc_html( $info_block['button'] ) . ': ' . \esc_url( $info_block['url'] ) . "\n\n";
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
<?php
|
||||
/**
|
||||
* Email Summary body template.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/wpforms/emails/summary-body.php.
|
||||
*
|
||||
* @since 1.5.4
|
||||
*
|
||||
* @version 1.5.4
|
||||
*
|
||||
* @var array $entries
|
||||
* @var array $info_block
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<table class="summary-container">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<h6 class="greeting"><?php esc_html_e( 'Hi there!', 'wpforms-lite' ); ?></h6>
|
||||
<?php if ( wpforms()->pro ) : ?>
|
||||
<p class="large"><?php esc_html_e( 'Let’s see how your forms performed in the past week.', 'wpforms-lite' ); ?></p>
|
||||
<?php else : ?>
|
||||
<p class="large"><?php esc_html_e( 'Let’s see how your forms performed.', 'wpforms-lite' ); ?></p>
|
||||
<p class="lite-disclaimer">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
__( 'Below is the total number of submissions for each form, <strong>however actual entries are not stored by WPForms Lite</strong>.', 'wpforms-lite' ),
|
||||
[
|
||||
'strong' => [],
|
||||
]
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p class="lite-disclaimer">
|
||||
<?php esc_html_e( 'To generate detailed reports and view future entries inside your WordPress dashboard, consider upgrading to Pro.', 'wpforms-lite' ); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<table class="email-summaries">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php esc_html_e( 'Form', 'wpforms-lite' ); ?></th>
|
||||
<th class="entries-column text-center"><?php esc_html_e( 'Entries', 'wpforms-lite' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php foreach ( $entries as $row ) : ?>
|
||||
<tr>
|
||||
<td class="text-large"><?php echo isset( $row['title'] ) ? esc_html( $row['title'] ) : ''; ?></td>
|
||||
<td class="entry-count text-large">
|
||||
<?php if ( empty( $row['edit_url'] ) ) : ?>
|
||||
<span>
|
||||
<?php echo isset( $row['count'] ) ? absint( $row['count'] ) : ''; ?>
|
||||
</span>
|
||||
<?php else : ?>
|
||||
<a href="<?php echo esc_url( $row['edit_url'] ); ?>">
|
||||
<?php echo isset( $row['count'] ) ? absint( $row['count'] ) : ''; ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if ( empty( $entries ) ) : ?>
|
||||
<tr>
|
||||
<td class="text-center" colspan="2"><?php esc_html_e( 'It appears you do not have any form entries yet.', 'wpforms-lite' ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<?php if ( ! empty( $info_block ) ) : ?>
|
||||
<table class="summary-info-table">
|
||||
<?php if ( ! empty( $info_block['title'] ) || ! empty( $info_block['content'] ) ) : ?>
|
||||
<tr>
|
||||
<td class="summary-info-content">
|
||||
<table>
|
||||
<?php if ( ! empty( $info_block['title'] ) ) : ?>
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<h6><?php echo esc_html( $info_block['title'] ); ?></h6>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if ( ! empty( $info_block['content'] ) ) : ?>
|
||||
<tr>
|
||||
<td class="text-center"><?php echo wp_kses_post( $info_block['content'] ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( ! empty( $info_block['url'] ) && ! empty( $info_block['button'] ) ) : ?>
|
||||
<tr>
|
||||
<td class="summary-info-content button-container">
|
||||
<center>
|
||||
<table class="button rounded-button">
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="<?php echo esc_url( $info_block['url'] ); ?>" rel="noopener noreferrer" target="_blank">
|
||||
<?php echo esc_html( $info_block['button'] ); ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Summary footer template (plain text).
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/wpforms/emails/summary-footer-plain.php.
|
||||
*
|
||||
* @since 1.6.2.3
|
||||
*
|
||||
* @version 1.6.2.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
echo "\n---\n\n";
|
||||
printf( /* translators: %s - link to a site. */
|
||||
esc_html__( 'This email was auto-generated and sent from %s.', 'wpforms-lite' ),
|
||||
esc_html( wp_specialchars_decode( get_bloginfo( 'name' ) ) )
|
||||
);
|
||||
echo "\n";
|
||||
printf( /* translators: %s - link to the documentation. */
|
||||
esc_html__( 'Learn how to disable: %s.', 'wpforms-lite' ),
|
||||
'https://wpforms.com/docs/how-to-use-email-summaries/#faq'
|
||||
);
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Summary footer template.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/wpforms/emails/summary-footer.php.
|
||||
*
|
||||
* @since 1.6.2.3
|
||||
*
|
||||
* @version 1.6.2.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" class="footer">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf( /* translators: %1$s - link to a site; %2$s - link to the documentation. */
|
||||
__( 'This email was auto-generated and sent from %1$s. Learn <a href="%2$s">how to disable</a>', 'wpforms-lite' ),
|
||||
'<a href="' . esc_url( home_url() ) . '">' . esc_html( wp_specialchars_decode( get_bloginfo( 'name' ) ) ) . '</a>',
|
||||
'https://wpforms.com/docs/how-to-use-email-summaries/#faq'
|
||||
),
|
||||
[
|
||||
'a' => [
|
||||
'href' => [],
|
||||
],
|
||||
]
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* Email Summary style template.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/wpforms/emails/summary-style.php.
|
||||
*
|
||||
* @since 1.5.4
|
||||
*
|
||||
* @version 1.5.4
|
||||
*
|
||||
* @var string $email_background_color
|
||||
*/
|
||||
|
||||
if ( ! \defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
require \WPFORMS_PLUGIN_DIR . '/assets/css/emails/summary.min.css';
|
||||
|
||||
?>
|
||||
|
||||
body, .body {
|
||||
background-color: <?php echo \esc_attr( $email_background_color ); ?>;
|
||||
}
|
||||
|
||||
<?php if ( ! empty( $header_image_max_width ) ) : ?>
|
||||
.header img {
|
||||
max-width: <?php echo \esc_attr( $header_image_max_width ); ?>;
|
||||
}
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user