PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.10
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.10
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 +75 -89 6.266.10 View file →
@@ -35,9 +35,8 @@
35 35 * be used. Otherwise, `https://formidableforms.com/{$page}` will be used.
36 36 * @type string $tip Tip text.
37 37 * @type string $call Call to action text.
38 38 * }
39 - *
40 39 * @param string $html
41 40 *
42 41 * @return void
43 42 */
@@ -55,12 +54,12 @@
55 54 if ( 'p' === $html ) {
56 55 echo '<p class="frmcenter ' . esc_attr( $tip['class'] ) . '">';
57 56 }
58 57
59 - $link = self::get_tip_link( $tip );
58 + $link = empty( $tip['link'] ) ? $tip['page'] : FrmAppHelper::admin_upgrade_link( $tip['link'], $tip['page'] );
60 59 ?>
61 - <a href="<?php echo esc_url( $link ); ?>" <?php echo empty( $tip['link'] ) ? '' : 'target="_blank"'; ?> class="frm_pro_tip frm-gradient">
62 - <span class="frm-tip-badge"><?php esc_html_e( 'PRO TIP', 'formidable' ); ?></span>
60 + <span class="frm_pro_tip">
61 + <?php FrmAppHelper::icon_by_class( 'frmfont frm_lightning', array( 'aria-hidden' => 'true' ) ); ?>
63 62
64 63 <?php if ( isset( $tip['call'] ) ) { ?>
65 64 <span class="frm-tip-info">
66 65 <?php echo esc_html( $tip['tip'] ); ?>
@@ -65,12 +64,12 @@
65 64 <span class="frm-tip-info">
66 65 <?php echo esc_html( $tip['tip'] ); ?>
67 66 </span>
68 67 <?php } ?>
69 - <span class="frm-tip-cta">
68 + <a href="<?php echo esc_url( $link ); ?>" <?php echo empty( $tip['link'] ) ? '' : 'target="_blank"'; ?> class="frm-tip-cta">
70 69 <?php echo esc_html( $tip['call'] ? $tip['call'] : $tip['tip'] ); ?>
71 - </span>
72 - </a>
70 + </a>
71 + </span>
73 72 <?php
74 73
75 74 if ( 'p' === $html ) {
76 75 echo '</p>';
@@ -77,32 +76,8 @@
77 76 }
78 77 }
79 78
80 79 /**
81 - * @since 6.21
82 - *
83 - * @param array $tip
84 - *
85 - * @return string
86 - */
87 - private static function get_tip_link( $tip ) {
88 - if ( empty( $tip['tip'] ) ) {
89 - return $tip['page'];
90 - }
91 -
92 - $cta_link = FrmSalesApi::get_best_sale_value( 'pro_tip_cta_link' );
93 -
94 - if ( $cta_link ) {
95 - if ( is_array( $tip['link'] ) ) {
96 - $cta_link = FrmAppHelper::maybe_add_missing_utm( $cta_link, $tip['link'] );
97 - }
98 - return $cta_link;
99 - }
100 -
101 - return FrmAppHelper::admin_upgrade_link( $tip['link'], $tip['page'] );
102 - }
103 -
104 - /**
105 80 * Use the correct label for the license.
106 81 *
107 82 * @since 6.5.1
108 83 *
@@ -108,13 +83,8 @@
108 83 *
109 84 * @return string
110 85 */
111 86 private static function cta_label() {
112 - $cta_text = FrmSalesApi::get_best_sale_value( 'pro_tip_cta_text' );
113 -
114 - if ( $cta_text ) {
115 - return $cta_text;
116 - }
117 87 return FrmAddonsController::is_license_expired() ? __( 'Renew', 'formidable' ) : __( 'Upgrade to Pro.', 'formidable' );
118 88 }
119 89
120 90 /**
@@ -134,10 +104,10 @@
134 104 'link' => array(
135 105 'content' => 'confirmation-fields',
136 106 'param' => 'confirmation-fields-wordpress-forms',
137 107 ),
138 - 'tip' => __( 'Eliminate input errors with email confirmation fields.', 'formidable' ),
139 - 'call' => self::cta_label(),
108 + 'tip' => __( 'Want to stop losing leads from email typos?', 'formidable' ),
109 + 'call' => __( 'Add email confirmation fields.', 'formidable' ),
140 110 ),
141 111 array(
142 112 'link' => array(
143 113 'content' => 'page-breaks',
@@ -150,10 +120,10 @@
150 120 'link' => array(
151 121 'content' => 'file-uploads',
152 122 'param' => 'wordpress-multi-file-upload-fields',
153 123 ),
154 - 'tip' => __( 'Skip the follow-ups. Let users upload files.', 'formidable' ),
155 - 'call' => self::cta_label(),
124 + 'tip' => __( 'Cut down on back-and-forth with clients.', 'formidable' ),
125 + 'call' => __( 'Allow file uploads in your form.', 'formidable' ),
156 126 ),
157 127 array(
158 128 'link' => array(
159 129 'content' => 'calculations',
@@ -166,10 +136,10 @@
166 136 'link' => array(
167 137 'content' => 'prefill-fields',
168 138 'param' => 'auto-fill-forms',
169 139 ),
170 - 'tip' => __( 'Save time with autofill forms.', 'formidable' ),
171 - 'call' => self::cta_label(),
140 + 'tip' => __( 'Save time.', 'formidable' ),
141 + 'call' => __( 'Fill out forms automatically!', 'formidable' ),
172 142 ),
173 143 );
174 144
175 145 return $tips;
@@ -184,10 +154,10 @@
184 154 'link' => array(
185 155 'content' => 'front-edit-b',
186 156 'param' => 'wordpress-front-end-editing',
187 157 ),
188 - 'tip' => __( 'Make your site dynamic. Enable front-end editing.', 'formidable' ),
189 - 'call' => self::cta_label(),
158 + 'tip' => __( 'A site with dynamic, user-generated content is within reach.', 'formidable' ),
159 + 'call' => __( 'Add front-end editing.', 'formidable' ),
190 160 ),
191 161 array(
192 162 'link' => array(
193 163 'content' => 'save-drafts',
@@ -192,10 +162,10 @@
192 162 'link' => array(
193 163 'content' => 'save-drafts',
194 164 'param' => 'save-drafts-wordpress-form',
195 165 ),
196 - 'tip' => __( 'Long form? Let users save and finish later', 'formidable' ),
197 - 'call' => self::cta_label(),
166 + 'tip' => __( 'Have long forms?', 'formidable' ),
167 + 'call' => __( 'Let users save drafts and return later!', 'formidable' ),
198 168 ),
199 169 array(
200 170 'link' => array(
201 171 'content' => 'form-scheduling',
@@ -200,10 +170,10 @@
200 170 'link' => array(
201 171 'content' => 'form-scheduling',
202 172 'param' => 'schedule-forms-wordpress',
203 173 ),
204 - 'tip' => __( 'Limit form access with built-in scheduling.', 'formidable' ),
205 - 'call' => self::cta_label(),
174 + 'tip' => __( 'Want your form open only for a certain time period?', 'formidable' ),
175 + 'call' => __( 'Add form scheduling.', 'formidable' ),
206 176 ),
207 177 );
208 178
209 179 return $tips;
@@ -218,10 +188,10 @@
218 188 'link' => array(
219 189 'content' => 'email-routing',
220 190 'param' => 'virtually-unlimited-emails',
221 191 ),
222 - 'tip' => __( 'Save time — route emails to the right person automatically.', 'formidable' ),
223 - 'call' => self::cta_label(),
192 + 'tip' => __( 'Save time by sending the email to the right person automatically.', 'formidable' ),
193 + 'call' => __( 'Add email routing.', 'formidable' ),
224 194 ),
225 195 array(
226 196 'link' => array(
227 197 'content' => 'create-posts',
@@ -242,10 +212,10 @@
242 212 'link' => array(
243 213 'content' => 'mailchimp',
244 214 'page' => 'mailchimp-tip',
245 215 ),
246 - 'tip' => __( 'Send leads to Mailchimp for instant email follow-up.', 'formidable' ),
247 - 'call' => self::cta_label(),
216 + 'tip' => __( 'Grow your business with automated email follow-up.', 'formidable' ),
217 + 'call' => __( 'Send leads straight to Mailchimp.', 'formidable' ),
248 218 ),
249 219 array(
250 220 'link' => array(
251 221 'content' => 'paypal-revenue',
@@ -250,10 +220,10 @@
250 220 'link' => array(
251 221 'content' => 'paypal-revenue',
252 222 'page' => 'paypal-increase-revenue-tip',
253 223 ),
254 - 'tip' => __( 'Accept PayPal payments and grow your sales.', 'formidable' ),
255 - 'call' => self::cta_label(),
224 + 'tip' => __( 'Increase revenue.', 'formidable' ),
225 + 'call' => __( 'Use PayPal with this form.', 'formidable' ),
256 226 ),
257 227 array(
258 228 'link' => array(
259 229 'content' => 'paypal-fast',
@@ -258,10 +228,10 @@
258 228 'link' => array(
259 229 'content' => 'paypal-fast',
260 230 'page' => 'paypal-save-time-tip',
261 231 ),
262 - 'tip' => __( 'Accept payments now with PayPal integration.', 'formidable' ),
263 - 'call' => self::cta_label(),
232 + 'tip' => __( 'Get paid instantly.', 'formidable' ),
233 + 'call' => __( 'Use Paypal with this form.', 'formidable' ),
264 234 ),
265 235 array(
266 236 'link' => array(
267 237 'content' => 'registration',
@@ -274,10 +244,10 @@
274 244 'link' => array(
275 245 'content' => 'profile',
276 246 'page' => 'registration-profile-editing-tip',
277 247 ),
278 - 'tip' => __( 'Enable front-end profile editing with User Registration.', 'formidable' ),
279 - 'call' => self::cta_label(),
248 + 'tip' => __( 'Need front-end profile editing?', 'formidable' ),
249 + 'call' => __( 'Add user registration.', 'formidable' ),
280 250 ),
281 251 array(
282 252 'link' => array(
283 253 'content' => 'twilio-payment',
@@ -282,10 +252,10 @@
282 252 'link' => array(
283 253 'content' => 'twilio-payment',
284 254 'page' => 'twilio-tip',
285 255 ),
286 - 'tip' => __( 'Get SMS alerts for form submissions and payments—just add Twilio.', 'formidable' ),
287 - 'call' => self::cta_label(),
256 + 'tip' => __( 'Want an SMS notification when a form is submitted or a payment received?', 'formidable' ),
257 + 'call' => __( 'Get the Twilio integration.', 'formidable' ),
288 258 ),
289 259 array(
290 260 'link' => array(
291 261 'content' => 'twilio',
@@ -290,10 +260,10 @@
290 260 'link' => array(
291 261 'content' => 'twilio',
292 262 'page' => 'twilio-send-tip',
293 263 ),
294 - 'tip' => __( 'Use Twilio to send SMS when forms are submitted.', 'formidable' ),
295 - 'call' => self::cta_label(),
264 + 'tip' => __( 'Send an SMS message when a form is submitted.', 'formidable' ),
265 + 'call' => __( 'Get the Twilio integration.', 'formidable' ),
296 266 ),
297 267 array(
298 268 'link' => array(
299 269 'content' => 'acf-tip',
@@ -298,10 +268,10 @@
298 268 'link' => array(
299 269 'content' => 'acf-tip',
300 270 'param' => 'acf-tip',
301 271 ),
302 - 'tip' => __( 'Fill Advanced Custom Fields automatically with form entries.', 'formidable' ),
303 - 'call' => self::cta_label(),
272 + 'tip' => __( 'Fill Advanced Custom Fields from a form.', 'formidable' ),
273 + 'call' => __( 'Add ACF Integration', 'formidable' ),
304 274 ),
305 275 );
306 276
307 277 return $tips;
@@ -316,10 +286,10 @@
316 286 'link' => array(
317 287 'content' => 'style',
318 288 'param' => 'wordpress-visual-form-styler',
319 289 ),
320 - 'tip' => __( 'Make your forms stand out with multiple style templates.', 'formidable' ),
321 - 'call' => self::cta_label(),
290 + 'tip' => __( 'Make your sidebar and footer forms stand out.', 'formidable' ),
291 + 'call' => __( 'Use multiple style templates.', 'formidable' ),
322 292 ),
323 293 array(
324 294 'link' => array(
325 295 'content' => 'style',
@@ -350,10 +320,10 @@
350 320 'link' => array(
351 321 'content' => 'entries',
352 322 'param' => 'form-entry-management-wordpress',
353 323 ),
354 - 'tip' => __( 'Edit form entries anytime with entry management.', 'formidable' ),
355 - 'call' => self::cta_label(),
324 + 'tip' => __( 'Want to edit form submissions?', 'formidable' ),
325 + 'call' => __( 'Add entry management.', 'formidable' ),
356 326 ),
357 327 array(
358 328 'link' => array(
359 329 'content' => 'entries-search',
@@ -366,10 +336,10 @@
366 336 'link' => array(
367 337 'content' => 'views',
368 338 'param' => 'views-display-form-data',
369 339 ),
370 - 'tip' => __( 'Turn entries into dynamic content — no code needed.', 'formidable' ),
371 - 'call' => self::cta_label(),
340 + 'tip' => __( 'A site with dynamic, user-generated content is within reach.', 'formidable' ),
341 + 'call' => __( 'Display form data with Views.', 'formidable' ),
372 342 ),
373 343 );
374 344 $tips = array_merge( $tips, self::get_import_tip() );
375 345
@@ -394,20 +364,47 @@
394 364 return $tips;
395 365 }
396 366
397 367 /**
398 - * @param array $tips
399 - *
400 368 * @return array
401 369 */
370 + public static function get_banner_tip() {
371 + $tips = array(
372 + array(
373 + 'link' => array(
374 + 'medium' => 'banner',
375 + 'content' => 'professional-results',
376 + ),
377 + 'tip' => __( 'Looking for more ways to get professional results?', 'formidable' ),
378 + 'call' => __( 'Take your forms to the next level.', 'formidable' ),
379 + ),
380 + array(
381 + 'link' => array(
382 + 'medium' => 'banner',
383 + 'content' => 'increase-conversions',
384 + ),
385 + 'tip' => __( 'Increase conversions in long forms.', 'formidable' ),
386 + 'call' => __( 'Add conditional logic, page breaks, and section headings.', 'formidable' ),
387 + ),
388 + array(
389 + 'link' => array(
390 + 'medium' => 'banner',
391 + 'content' => 'automate',
392 + ),
393 + 'tip' => __( 'Automate your business and increase revenue.', 'formidable' ),
394 + 'call' => __( 'Collect instant payments, and send leads to Mailchimp.', 'formidable' ),
395 + ),
396 + );
397 + $random = rand( 0, count( $tips ) - 1 );
398 + $tip = $tips[ $random ];
399 + $tip['num'] = $random;
400 +
401 + return $tip;
402 + }
403 +
402 404 public static function get_random_tip( $tips ) {
403 - $count = count( $tips );
405 + $random = rand( 0, count( $tips ) - 1 );
404 406
405 - if ( $count === 0 ) {
406 - return array();
407 - }
408 -
409 - $random = random_int( 0, $count - 1 );
410 407 return $tips[ $random ];
411 408 }
412 409
413 410 /**
@@ -441,9 +438,8 @@
441 438 'link_text' => '',
442 439 'link_url' => '#',
443 440 'class' => '',
444 441 'id' => '',
445 - 'target' => '_blank',
446 442 );
447 443
448 444 $args = wp_parse_args( $args, $defaults );
449 445
@@ -455,16 +451,6 @@
455 451 $attributes['id'] = $args['id'];
456 452 }
457 453
458 454 require FrmAppHelper::plugin_path() . '/classes/views/shared/admin-cta.php';
459 - }
460 -
461 - /**
462 - * @deprecated 6.21
463 - *
464 - * @return array
465 - */
466 - public static function get_banner_tip() {
467 - _deprecated_function( __METHOD__, '6.21' );
468 - return array();
469 455 }
470 456 }