PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 4.07.01
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v4.07.01
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/controllers/FrmInboxController.php +4 -45 6.3.14.07.01 View file →
@@ -9,13 +9,12 @@
9 9 class FrmInboxController {
10 10
11 11 /**
12 12 * @since 4.05
13 - *
14 - * @return void
15 13 */
16 14 public static function menu() {
17 15 $unread = self::get_notice_count();
16 +
18 17 add_submenu_page( 'formidable', 'Formidable | ' . __( 'Inbox', 'formidable' ), __( 'Inbox', 'formidable' ) . $unread, 'frm_change_settings', 'formidable-inbox', 'FrmInboxController::inbox' );
19 18 }
20 19
21 20 /**
@@ -23,16 +22,14 @@
23 22 */
24 23 private static function get_notice_count() {
25 24 FrmFormMigratorsHelper::maybe_add_to_inbox();
26 25
27 - $inbox = new FrmInbox();
26 + $inbox = new FrmInbox();
28 27 return $inbox->unread_html();
29 28 }
30 29
31 30 /**
32 31 * @since 4.06
33 - *
34 - * @return void
35 32 */
36 33 public static function dismiss_all_button( $atts ) {
37 34 if ( empty( $atts['messages'] ) ) {
38 35 return;
@@ -37,9 +34,9 @@
37 34 if ( empty( $atts['messages'] ) ) {
38 35 return;
39 36 }
40 37
41 - echo '<button class="frm-button-secondary" id="frm-dismiss-inbox" type="button">' .
38 + echo '<button class="button-secondary frm-button-secondary" id="frm-dismiss-inbox" type="button">' .
42 39 esc_html__( 'Dismiss All', 'formidable' ) .
43 40 '</button>';
44 41 }
45 42
@@ -44,15 +41,12 @@
44 41 }
45 42
46 43 /**
47 44 * @since 4.05
48 - *
49 - * @return void
50 45 */
51 46 public static function inbox() {
52 47 FrmAppHelper::include_svg();
53 48 self::add_tracking_request();
54 - self::add_free_template_message();
55 49
56 50 $inbox = new FrmInbox();
57 51 $messages = $inbox->get_messages( 'filter' );
58 52 $messages = array_reverse( $messages );
@@ -64,10 +58,8 @@
64 58 }
65 59
66 60 /**
67 61 * @since 4.05
68 - *
69 - * @return void
70 62 */
71 63 public static function dismiss_message() {
72 64 check_ajax_referer( 'frm_ajax', 'nonce' );
73 65 FrmAppHelper::permission_check( 'frm_change_settings' );
@@ -86,10 +78,8 @@
86 78 }
87 79
88 80 /**
89 81 * @since 4.05
90 - *
91 - * @return void
92 82 */
93 83 private static function add_tracking_request() {
94 84 $settings = FrmAppHelper::get_settings();
95 85 if ( $settings->tracking ) {
@@ -103,40 +93,9 @@
103 93 array(
104 94 'key' => 'usage',
105 95 'message' => 'Gathering usage data allows us to improve Formidable. Your forms will be considered as we evaluate new features, judge the quality of an update, or determine if an improvement makes sense. You can always visit the <a href="' . esc_url( $link ) . '">Global Settings</a> and choose to stop sharing data. <a href="https://formidableforms.com/knowledgebase/global-settings-overview/#kb-usage-tracking" target="_blank" rel="noopener noreferrer">Read more about what data we collect</a>.',
106 96 'subject' => __( 'Help Formidable improve with usage tracking', 'formidable' ),
107 - 'cta' => '<a href="#" class="frm-button-secondary frm_inbox_dismiss">Dismiss</a> <a href="' . esc_url( $link ) . '" class="button-primary frm-button-primary frm_inbox_dismiss">Activate usage tracking</a>',
108 - 'type' => 'feedback',
109 - )
110 - );
111 - }
112 -
113 - /**
114 - * Adds free template design.
115 - *
116 - * @since 4.10.03
117 - *
118 - * @return void
119 - */
120 - private static function add_free_template_message() {
121 - if ( FrmAppHelper::pro_is_installed() ) {
122 - return;
123 - }
124 -
125 - $api = new FrmFormTemplateApi();
126 - if ( $api->has_free_access() ) {
127 - return;
128 - }
129 -
130 - $link = admin_url( 'admin.php?page=formidable&triggerNewFormModal=1&free-templates=1' );
131 -
132 - $message = new FrmInbox();
133 - $message->add_message(
134 - array(
135 - 'key' => 'free_templates',
136 - 'message' => 'Add your email address to get a code for 10+ free form templates.',
137 - 'subject' => 'Get 10+ Free Form Templates',
138 - 'cta' => '<a href="#" class="frm-button-secondary frm_inbox_dismiss">Dismiss</a> <a href="' . esc_url( $link ) . '" class="button-primary frm-button-primary">Get Now</a>',
97 + 'cta' => '<a href="#" class="button-secondary frm-button-secondary frm_inbox_dismiss">Dismiss</a> <a href="' . esc_url( $link ) . '" class="button-primary frm-button-primary frm_inbox_dismiss">Activate usage tracking</a>',
139 98 'type' => 'feedback',
140 99 )
141 100 );
142 101 }