From be7d7a135661fb505e1c16969c179df226009c1f Mon Sep 17 00:00:00 2001 From: Garrett Hyder Date: Thu, 7 Apr 2016 09:49:29 -0700 Subject: [PATCH 1/2] Introduced the %subject% as an available tag on the Email Template --- wpbe.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wpbe.php b/wpbe.php index b620920..759fb40 100644 --- a/wpbe.php +++ b/wpbe.php @@ -357,12 +357,15 @@ function ajax_send_preview( $email ) { */ function template_vars_replacement( $template ) { + global $phpmailer; + $to_replace = array( 'blog_url' => get_option( 'siteurl' ), 'home_url' => get_option( 'home' ), 'blog_name' => get_option( 'blogname' ), 'blog_description' => get_option( 'blogdescription' ), 'admin_email' => get_option( 'admin_email' ), + 'subject' => $phpmailer->Subject, 'date' => date_i18n( get_option( 'date_format' ) ), 'time' => date_i18n( get_option( 'time_format' ) ) ); @@ -391,7 +394,7 @@ function check_template() { /** * Add the template to the message body. * - * Looks for %message% into the template and replaces it with the message. + * Looks for %subject% and %content% in the template and replaces them appropriately. * * @since 0.1 * @param string $body The message to templatize @@ -586,6 +589,7 @@ function contextual_help( $contextual_help, $screen_id, $screen ) { return '

' . __( 'Some dynamic tags can be included in your email template :', 'wp-better-emails' ) . '