PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/models/FrmEmailSummary.php +8 -4 6.25 → trunk View file →
@@ -2,8 +2,9 @@
2 2 /**
3 3 * Summary email base class
4 4 *
5 5 * @since 6.7
6 + *
6 7 * @package Formidable
7 8 */
8 9
9 10 if ( ! defined( 'ABSPATH' ) ) {
@@ -92,8 +93,9 @@
92 93 * @return false|string
93 94 */
94 95 protected function get_content() {
95 96 $args = $this->get_content_args();
97 +
96 98 if ( false === $args ) {
97 99 return false;
98 100 }
99 101
@@ -100,11 +102,9 @@
100 102 ob_start();
101 103 include $this->get_include_file( $this->template );
102 104 $content = ob_get_clean();
103 105
104 - $content = str_replace( '%%INNER_CONTENT%%', $this->get_inner_content(), $content );
105 -
106 - return $content;
106 + return str_replace( '%%INNER_CONTENT%%', $this->get_inner_content(), $content );
107 107 }
108 108
109 109 /**
110 110 * Gets include file path from the given file name.
@@ -109,8 +109,9 @@
109 109 /**
110 110 * Gets include file path from the given file name.
111 111 *
112 112 * @param string $file_name File name.
113 + *
113 114 * @return string
114 115 */
115 116 protected function get_include_file( $file_name ) {
116 117 $suffix = $this->is_html ? '' : '-plain';
@@ -176,8 +177,9 @@
176 177 return false;
177 178 }
178 179
179 180 $recipients = $this->get_recipients();
181 +
180 182 if ( ! $recipients ) {
181 183 // Return true to not try to send this email on the next day.
182 184 return true;
183 185 }
@@ -182,15 +184,17 @@
182 184 return true;
183 185 }
184 186
185 187 $content = $this->get_content();
188 +
186 189 if ( false === $content ) {
187 190 return true;
188 191 }
192 +
189 193 $subject = $this->get_subject();
190 194 $headers = $this->get_headers();
195 + $sent = wp_mail( $recipients, $subject, $content, $headers );
191 196
192 - $sent = wp_mail( $recipients, $subject, $content, $headers );
193 197 if ( ! $sent ) {
194 198 $headers = implode( "\r\n", $headers );
195 199 $sent = mail( $recipients, $subject, $content, $headers );
196 200 }