PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 4.01.02
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v4.01.02
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/FrmNotification.php +24 -12 6.264.01.02 View file →
@@ -1,11 +1,13 @@
1 1 <?php
2 -if ( ! defined( 'ABSPATH' ) ) {
3 - die( 'You are not allowed to call this page directly.' );
4 -}
5 2
3 +// TODO: change class name to FrmEmailController by 08/2017 or later
6 4 class FrmNotification {
7 5 public function __construct() {
6 + if ( ! defined( 'ABSPATH' ) ) {
7 + die( 'You are not allowed to call this page directly.' );
8 + }
9 +
8 10 self::hook_emails_to_action();
9 11 }
10 12
11 13 /**
@@ -13,10 +15,8 @@
13 15 *
14 16 * @param object $action
15 17 * @param object $entry
16 18 * @param object $form
17 - *
18 - * @return void
19 19 */
20 20 public static function trigger_email( $action, $entry, $form ) {
21 21 $email = new FrmEmail( $action, $entry, $form );
22 22
@@ -34,10 +34,8 @@
34 34 /**
35 35 * Remove the trigger_email function from the frm_trigger_email_action hook
36 36 *
37 37 * @since 2.03.04
38 - *
39 - * @return void
40 38 */
41 39 public static function stop_emails() {
42 40 remove_action( 'frm_trigger_email_action', 'FrmNotification::trigger_email', 10 );
43 41 }
@@ -45,10 +43,8 @@
45 43 /**
46 44 * Hook the trigger_email function to frm_trigger_email_action action
47 45 *
48 46 * @since 2.03.04
49 - *
50 - * @return void
51 47 */
52 48 public static function hook_emails_to_action() {
53 49 add_action( 'frm_trigger_email_action', 'FrmNotification::trigger_email', 10, 3 );
54 50 }
@@ -58,10 +54,8 @@
58 54 *
59 55 * @since 2.03.04
60 56 *
61 57 * @param array $atts
62 - *
63 - * @return void
64 58 */
65 59 private static function print_recipients( $atts ) {
66 60 if ( apply_filters( 'frm_echo_emails', false ) ) {
67 61
@@ -68,8 +62,26 @@
68 62 $sent_to = array_merge( (array) $atts['to_email'], (array) $atts['cc'], (array) $atts['bcc'] );
69 63 $sent_to = array_filter( $sent_to );
70 64
71 65 $temp = str_replace( '<', '&lt;', $sent_to );
72 - echo ' ' . FrmAppHelper::kses( implode( ', ', $temp ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
66 + echo ' ' . FrmAppHelper::kses( implode( ', ', (array) $temp ) ); // WPCS: XSS ok.
73 67 }
68 + }
69 +
70 + /**
71 + * @deprecated 2.03.04
72 + * @codeCoverageIgnore
73 + */
74 + public static function remove_mandrill_br() {
75 + _deprecated_function( __FUNCTION__, '2.03.04', 'FrmEmailHelper::remove_mandrill_br' );
76 +
77 + return FrmEmailHelper::remove_mandrill_br();
78 + }
79 +
80 + /**
81 + * @deprecated 2.03.04
82 + * @codeCoverageIgnore
83 + */
84 + public static function send_email() {
85 + _deprecated_function( __FUNCTION__, '2.03.04', 'FrmEmail::send' );
74 86 }
75 87 }