@@ -60,8 +60,10 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | public function read( $format = '' ) |
| 62 | 62 | { |
| 63 | - if( $format == 'plaintext' )) { |
|
| 63 | + if( $format == 'plaintext' ) { |
|
| 64 | + ) { |
|
| 64 | 65 | $message = $this->stripHtmlTags( $this->message ); |
| 66 | + } |
|
| 65 | 67 | return apply_filters( 'site-reviews/email/message', $message, 'text', $this ); |
| 66 | 68 | } |
| 67 | 69 | return $this->message; |
@@ -72,7 +74,9 @@ discard block |
||
| 72 | 74 | */ |
| 73 | 75 | public function send() |
| 74 | 76 | { |
| 75 | - if( !$this->message || !$this->subject || !$this->to )return; |
|
| 77 | + if( !$this->message || !$this->subject || !$this->to ) { |
|
| 78 | + return; |
|
| 79 | + } |
|
| 76 | 80 | $sent = wp_mail( |
| 77 | 81 | $this->to, |
| 78 | 82 | $this->subject, |
@@ -90,8 +94,12 @@ discard block |
||
| 90 | 94 | */ |
| 91 | 95 | public function buildPlainTextMessage( PHPMailer $phpmailer ) |
| 92 | 96 | { |
| 93 | - if( empty( $this->email ))return; |
|
| 94 | - if( $phpmailer->ContentType === 'text/plain' || !empty( $phpmailer->AltBody ))return; |
|
| 97 | + if( empty( $this->email )) { |
|
| 98 | + return; |
|
| 99 | + } |
|
| 100 | + if( $phpmailer->ContentType === 'text/plain' || !empty( $phpmailer->AltBody )) { |
|
| 101 | + return; |
|
| 102 | + } |
|
| 95 | 103 | $message = $this->stripHtmlTags( $phpmailer->Body ); |
| 96 | 104 | $phpmailer->AltBody = apply_filters( 'site-reviews/email/message', $message, 'text', $this ); |
| 97 | 105 | } |