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/helpers/FrmTipsHelper.php +34 -100 6.44.07.01 View file →
@@ -4,14 +4,8 @@
4 4 }
5 5
6 6 class FrmTipsHelper {
7 7
8 - /**
9 - * @param string $callback
10 - * @param string $html
11 - *
12 - * @return void
13 - */
14 8 public static function pro_tip( $callback, $html = '' ) {
15 9 if ( FrmAppHelper::pro_is_installed() ) {
16 10 return;
17 11 }
@@ -18,50 +12,29 @@
18 12
19 13 $tips = self::$callback();
20 14 $tip = self::get_random_tip( $tips );
21 15
22 - self::show_tip( $tip );
23 - }
16 + if ( 'p' === $html ) {
17 + echo '<p class="frmcenter frm_no_top_margin">';
18 + }
24 19
25 - /**
26 - * Shows tip.
27 - *
28 - * @since 6.0
29 - *
30 - * @param array $tip {
31 - * Tip args
32 - *
33 - * @type array $link Tip link data. See the first parameter of {@see FrmAppHelper::admin_upgrade_link()} for more details.
34 - * @type string $page The based link of the tip. If this is empty, `https://formidableforms.com/lite-upgrade/` will
35 - * be used. Otherwise, `https://formidableforms.com/{$page}` will be used.
36 - * @type string $tip Tip text.
37 - * @type string $call Call to action text.
38 - * }
39 - * @param string $html
40 - *
41 - * @return void
42 - */
43 - public static function show_tip( $tip, $html = '' ) {
44 20 if ( ! isset( $tip['page'] ) ) {
45 21 $tip['page'] = '';
46 22 }
47 - if ( isset( $tip['link'] ) && ! isset( $tip['link']['medium'] ) ) {
23 + if ( ! isset( $tip['link']['medium'] ) ) {
48 24 $tip['link']['medium'] = 'tip';
49 25 }
50 26
51 - if ( 'p' === $html ) {
52 - echo '<p class="frmcenter frm-mt-0">';
53 - }
54 -
55 - $link = empty( $tip['link'] ) ? $tip['page'] : FrmAppHelper::admin_upgrade_link( $tip['link'], $tip['page'] );
27 + $link = FrmAppHelper::admin_upgrade_link( $tip['link'], $tip['page'] );
56 28 ?>
57 - <a href="<?php echo esc_url( $link ); ?>" <?php echo empty( $tip['link'] ) ? '' : 'target="_blank"'; ?> class="frm_pro_tip">
58 - <?php FrmAppHelper::icon_by_class( 'frmfont frm_lightning', array( 'aria-hidden' => 'true' ) ); ?>
29 + <a href="<?php echo esc_url( $link ); ?>" target="_blank" class="frm_pro_tip">
30 + <?php FrmAppHelper::icon_by_class( 'frmfont frm_star_full_icon', array( 'aria-hidden' => 'true' ) ); ?>
31 + <span class="pro-tip">
32 + <?php esc_html_e( 'Pro Tip:', 'formidable' ); ?>
33 + </span>
59 34
60 35 <?php if ( isset( $tip['call'] ) ) { ?>
61 - <span class="frm-tip-info">
62 - <?php echo esc_html( $tip['tip'] ); ?>
63 - </span>
36 + <?php echo esc_html( $tip['tip'] ); ?>
64 37 <span class="frm-tip-cta">
65 38 <?php echo esc_html( $tip['call'] ); ?>
66 39 </span>
67 40 <?php } else { ?>
@@ -70,17 +43,13 @@
70 43 </span>
71 44 <?php } ?>
72 45 </a>
73 46 <?php
74 -
75 47 if ( 'p' === $html ) {
76 48 echo '</p>';
77 49 }
78 50 }
79 51
80 - /**
81 - * @return array
82 - */
83 52 public static function get_builder_tip() {
84 53 $tips = array(
85 54 array(
86 55 'link' => array(
@@ -102,10 +71,10 @@
102 71 'link' => array(
103 72 'content' => 'page-breaks',
104 73 'param' => 'wordpress-multi-page-forms',
105 74 ),
106 - 'tip' => __( 'Use page breaks for easier forms.', 'formidable' ),
107 - 'call' => __( 'Upgrade to Pro.', 'formidable' ),
75 + 'tip' => __( 'Stop intimidating users with long forms.', 'formidable' ),
76 + 'call' => __( 'Use page breaks.', 'formidable' ),
108 77 ),
109 78 array(
110 79 'link' => array(
111 80 'content' => 'file-uploads',
@@ -127,9 +96,9 @@
127 96 'content' => 'prefill-fields',
128 97 'param' => 'auto-fill-forms',
129 98 ),
130 99 'tip' => __( 'Save time.', 'formidable' ),
131 - 'call' => __( 'Fill out forms automatically!', 'formidable' ),
100 + 'call' => __( 'Prefill fields with user info.', 'formidable' ),
132 101 ),
133 102 );
134 103
135 104 return $tips;
@@ -134,11 +103,8 @@
134 103
135 104 return $tips;
136 105 }
137 106
138 - /**
139 - * @return array
140 - */
141 107 public static function get_form_settings_tip() {
142 108 $tips = array(
143 109 array(
144 110 'link' => array(
@@ -152,17 +118,24 @@
152 118 'link' => array(
153 119 'content' => 'save-drafts',
154 120 'param' => 'save-drafts-wordpress-form',
155 121 ),
156 - 'tip' => __( 'Have long forms?', 'formidable' ),
157 - 'call' => __( 'Let users save drafts and return later!', 'formidable' ),
122 + 'tip' => __( 'Have a long form that takes time to complete?', 'formidable' ),
123 + 'call' => __( 'Let logged-in users save a draft and return later.', 'formidable' ),
158 124 ),
159 125 array(
160 126 'link' => array(
127 + 'content' => 'ajax',
128 + ),
129 + 'tip' => __( 'Want to submit forms without reloading the page?', 'formidable' ),
130 + 'call' => __( 'Get ajax form submit.', 'formidable' ),
131 + ),
132 + array(
133 + 'link' => array(
161 134 'content' => 'form-scheduling',
162 135 'param' => 'schedule-forms-wordpress',
163 136 ),
164 - 'tip' => __( 'Want your form open only for a certain time period?', 'formidable' ),
137 + 'tip' => __( 'Need to open and close your form on specific days?', 'formidable' ),
165 138 'call' => __( 'Add form scheduling.', 'formidable' ),
166 139 ),
167 140 );
168 141
@@ -168,11 +141,8 @@
168 141
169 142 return $tips;
170 143 }
171 144
172 - /**
173 - * @return array
174 - */
175 145 public static function get_form_action_tip() {
176 146 $tips = array(
177 147 array(
178 148 'link' => array(
@@ -194,9 +164,9 @@
194 164 'link' => array(
195 165 'content' => 'user-submit',
196 166 'param' => 'create-posts-pages-wordpress-forms',
197 167 ),
198 - 'tip' => __( 'Let your users submit posts on the front-end.', 'formidable' ),
168 + 'tip' => __( 'Make front-end posting easy.', 'formidable' ),
199 169 'call' => __( 'Upgrade to Pro.', 'formidable' ),
200 170 ),
201 171 array(
202 172 'link' => array(
@@ -203,9 +173,9 @@
203 173 'content' => 'mailchimp',
204 174 'page' => 'mailchimp-tip',
205 175 ),
206 176 'tip' => __( 'Grow your business with automated email follow-up.', 'formidable' ),
207 - 'call' => __( 'Send leads straight to Mailchimp.', 'formidable' ),
177 + 'call' => __( 'Send leads straight to MailChimp.', 'formidable' ),
208 178 ),
209 179 array(
210 180 'link' => array(
211 181 'content' => 'paypal-revenue',
@@ -226,10 +196,10 @@
226 196 'link' => array(
227 197 'content' => 'registration',
228 198 'page' => 'registration-tip',
229 199 ),
230 - 'tip' => __( 'Automatically create user accounts.', 'formidable' ),
231 - 'call' => __( 'Upgrade to boost your site membership.', 'formidable' ),
200 + 'tip' => __( 'Boost your site membership.', 'formidable' ),
201 + 'call' => __( 'Automatically create user accounts.', 'formidable' ),
232 202 ),
233 203 array(
234 204 'link' => array(
235 205 'content' => 'profile',
@@ -234,9 +204,9 @@
234 204 'link' => array(
235 205 'content' => 'profile',
236 206 'page' => 'registration-profile-editing-tip',
237 207 ),
238 - 'tip' => __( 'Need front-end profile editing?', 'formidable' ),
208 + 'tip' => __( 'Make front-end profile editing possible.', 'formidable' ),
239 209 'call' => __( 'Add user registration.', 'formidable' ),
240 210 ),
241 211 array(
242 212 'link' => array(
@@ -242,10 +212,10 @@
242 212 'link' => array(
243 213 'content' => 'twilio-payment',
244 214 'page' => 'twilio-tip',
245 215 ),
246 - 'tip' => __( 'Want an SMS notification when a form is submitted or a payment received?', 'formidable' ),
247 - 'call' => __( 'Get the Twilio integration.', 'formidable' ),
216 + 'tip' => __( 'Want a text when this form is submitted or when a payment is received?', 'formidable' ),
217 + 'call' => __( 'Use Twilio with this form.', 'formidable' ),
248 218 ),
249 219 array(
250 220 'link' => array(
251 221 'content' => 'twilio',
@@ -250,27 +220,16 @@
250 220 'link' => array(
251 221 'content' => 'twilio',
252 222 'page' => 'twilio-send-tip',
253 223 ),
254 - 'tip' => __( 'Send an SMS message when a form is submitted.', 'formidable' ),
255 - 'call' => __( 'Get the Twilio integration.', 'formidable' ),
224 + 'tip' => __( 'Send a text when this form is submitted.', 'formidable' ),
225 + 'call' => __( 'Get Twilio.', 'formidable' ),
256 226 ),
257 - array(
258 - 'link' => array(
259 - 'content' => 'acf-tip',
260 - 'param' => 'acf-tip',
261 - ),
262 - 'tip' => __( 'Fill Advanced Custom Fields from a form.', 'formidable' ),
263 - 'call' => __( 'Add ACF Integration', 'formidable' ),
264 - ),
265 227 );
266 228
267 229 return $tips;
268 230 }
269 231
270 - /**
271 - * @return array
272 - */
273 232 public static function get_styling_tip() {
274 233 $tips = array(
275 234 array(
276 235 'link' => array(
@@ -279,32 +238,13 @@
279 238 ),
280 239 'tip' => __( 'Make your sidebar and footer forms stand out.', 'formidable' ),
281 240 'call' => __( 'Use multiple style templates.', 'formidable' ),
282 241 ),
283 - array(
284 - 'link' => array(
285 - 'content' => 'style',
286 - 'param' => 'bg-image-style-settings',
287 - ),
288 - 'tip' => __( 'Want to add a background image?', 'formidable' ),
289 - 'call' => __( 'Upgrade to Pro.', 'formidable' ),
290 - ),
291 - array(
292 - 'link' => array(
293 - 'content' => 'style',
294 - 'param' => 'duplicate-style',
295 - ),
296 - 'tip' => __( 'Want to duplicate a style?', 'formidable' ),
297 - 'call' => __( 'Upgrade to Pro.', 'formidable' ),
298 - ),
299 242 );
300 243
301 244 return $tips;
302 245 }
303 246
304 - /**
305 - * @return array
306 - */
307 247 public static function get_entries_tip() {
308 248 $tips = array(
309 249 array(
310 250 'link' => array(
@@ -335,11 +275,8 @@
335 275
336 276 return $tips;
337 277 }
338 278
339 - /**
340 - * @return array
341 - */
342 279 public static function get_import_tip() {
343 280 $tips = array(
344 281 array(
345 282 'link' => array(
@@ -353,11 +290,8 @@
353 290
354 291 return $tips;
355 292 }
356 293
357 - /**
358 - * @return array
359 - */
360 294 public static function get_banner_tip() {
361 295 $tips = array(
362 296 array(
363 297 'link' => array(
@@ -380,9 +314,9 @@
380 314 'medium' => 'banner',
381 315 'content' => 'automate',
382 316 ),
383 317 'tip' => __( 'Automate your business and increase revenue.', 'formidable' ),
384 - 'call' => __( 'Collect instant payments, and send leads to Mailchimp.', 'formidable' ),
318 + 'call' => __( 'Collect instant payments, and send leads to MailChimp.', 'formidable' ),
385 319 ),
386 320 );
387 321 $random = rand( 0, count( $tips ) - 1 );
388 322 $tip = $tips[ $random ];