PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.13
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.13
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 +94 -99 6.276.13 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 */
@@ -47,10 +46,10 @@
47 46 'class' => 'frm-mt-0',
48 47 );
49 48 $tip = array_merge( $defaults, $tip );
50 49
51 - if ( isset( $tip['link'] ) && ! isset( $tip['link']['medium'] ) && ! isset( $tip['link']['campaign'] ) ) {
52 - $tip['link']['campaign'] = 'tip';
50 + if ( isset( $tip['link'] ) && ! isset( $tip['link']['medium'] ) ) {
51 + $tip['link']['medium'] = 'tip';
53 52 }
54 53
55 54 if ( 'p' === $html ) {
56 55 echo '<p class="frmcenter ' . esc_attr( $tip['class'] ) . '">';
@@ -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,33 +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 -
99 - return $cta_link;
100 - }
101 -
102 - return FrmAppHelper::admin_upgrade_link( $tip['link'], $tip['page'] );
103 - }
104 -
105 - /**
106 80 * Use the correct label for the license.
107 81 *
108 82 * @since 6.5.1
109 83 *
@@ -109,14 +83,8 @@
109 83 *
110 84 * @return string
111 85 */
112 86 private static function cta_label() {
113 - $cta_text = FrmSalesApi::get_best_sale_value( 'pro_tip_cta_text' );
114 -
115 - if ( $cta_text ) {
116 - return $cta_text;
117 - }
118 -
119 87 return FrmAddonsController::is_license_expired() ? __( 'Renew', 'formidable' ) : __( 'Upgrade to Pro.', 'formidable' );
120 88 }
121 89
122 90 /**
@@ -122,9 +90,9 @@
122 90 /**
123 91 * @return array
124 92 */
125 93 public static function get_builder_tip() {
126 - return array(
94 + $tips = array(
127 95 array(
128 96 'link' => array(
129 97 'content' => 'conditional-logic',
130 98 'param' => 'conditional-logic-wordpress-forms',
@@ -136,10 +104,10 @@
136 104 'link' => array(
137 105 'content' => 'confirmation-fields',
138 106 'param' => 'confirmation-fields-wordpress-forms',
139 107 ),
140 - 'tip' => __( 'Eliminate input errors with email confirmation fields.', 'formidable' ),
141 - 'call' => self::cta_label(),
108 + 'tip' => __( 'Want to stop losing leads from email typos?', 'formidable' ),
109 + 'call' => __( 'Add email confirmation fields.', 'formidable' ),
142 110 ),
143 111 array(
144 112 'link' => array(
145 113 'content' => 'page-breaks',
@@ -152,10 +120,10 @@
152 120 'link' => array(
153 121 'content' => 'file-uploads',
154 122 'param' => 'wordpress-multi-file-upload-fields',
155 123 ),
156 - 'tip' => __( 'Skip the follow-ups. Let users upload files.', 'formidable' ),
157 - 'call' => self::cta_label(),
124 + 'tip' => __( 'Cut down on back-and-forth with clients.', 'formidable' ),
125 + 'call' => __( 'Allow file uploads in your form.', 'formidable' ),
158 126 ),
159 127 array(
160 128 'link' => array(
161 129 'content' => 'calculations',
@@ -168,12 +136,14 @@
168 136 'link' => array(
169 137 'content' => 'prefill-fields',
170 138 'param' => 'auto-fill-forms',
171 139 ),
172 - 'tip' => __( 'Save time with autofill forms.', 'formidable' ),
173 - 'call' => self::cta_label(),
140 + 'tip' => __( 'Save time.', 'formidable' ),
141 + 'call' => __( 'Fill out forms automatically!', 'formidable' ),
174 142 ),
175 143 );
144 +
145 + return $tips;
176 146 }
177 147
178 148 /**
179 149 * @return array
@@ -178,16 +148,16 @@
178 148 /**
179 149 * @return array
180 150 */
181 151 public static function get_form_settings_tip() {
182 - return array(
152 + $tips = array(
183 153 array(
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,12 +170,14 @@
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 );
178 +
179 + return $tips;
208 180 }
209 181
210 182 /**
211 183 * @return array
@@ -210,16 +182,16 @@
210 182 /**
211 183 * @return array
212 184 */
213 185 public static function get_form_action_tip() {
214 - return array(
186 + $tips = array(
215 187 array(
216 188 'link' => array(
217 189 'content' => 'email-routing',
218 190 'param' => 'virtually-unlimited-emails',
219 191 ),
220 - 'tip' => __( 'Save time — route emails to the right person automatically.', 'formidable' ),
221 - 'call' => self::cta_label(),
192 + 'tip' => __( 'Save time by sending the email to the right person automatically.', 'formidable' ),
193 + 'call' => __( 'Add email routing.', 'formidable' ),
222 194 ),
223 195 array(
224 196 'link' => array(
225 197 'content' => 'create-posts',
@@ -240,10 +212,10 @@
240 212 'link' => array(
241 213 'content' => 'mailchimp',
242 214 'page' => 'mailchimp-tip',
243 215 ),
244 - 'tip' => __( 'Send leads to Mailchimp for instant email follow-up.', 'formidable' ),
245 - 'call' => self::cta_label(),
216 + 'tip' => __( 'Grow your business with automated email follow-up.', 'formidable' ),
217 + 'call' => __( 'Send leads straight to Mailchimp.', 'formidable' ),
246 218 ),
247 219 array(
248 220 'link' => array(
249 221 'content' => 'paypal-revenue',
@@ -248,10 +220,10 @@
248 220 'link' => array(
249 221 'content' => 'paypal-revenue',
250 222 'page' => 'paypal-increase-revenue-tip',
251 223 ),
252 - 'tip' => __( 'Accept PayPal payments and grow your sales.', 'formidable' ),
253 - 'call' => self::cta_label(),
224 + 'tip' => __( 'Increase revenue.', 'formidable' ),
225 + 'call' => __( 'Use PayPal with this form.', 'formidable' ),
254 226 ),
255 227 array(
256 228 'link' => array(
257 229 'content' => 'paypal-fast',
@@ -256,10 +228,10 @@
256 228 'link' => array(
257 229 'content' => 'paypal-fast',
258 230 'page' => 'paypal-save-time-tip',
259 231 ),
260 - 'tip' => __( 'Accept payments now with PayPal integration.', 'formidable' ),
261 - 'call' => self::cta_label(),
232 + 'tip' => __( 'Get paid instantly.', 'formidable' ),
233 + 'call' => __( 'Use Paypal with this form.', 'formidable' ),
262 234 ),
263 235 array(
264 236 'link' => array(
265 237 'content' => 'registration',
@@ -272,10 +244,10 @@
272 244 'link' => array(
273 245 'content' => 'profile',
274 246 'page' => 'registration-profile-editing-tip',
275 247 ),
276 - 'tip' => __( 'Enable front-end profile editing with User Registration.', 'formidable' ),
277 - 'call' => self::cta_label(),
248 + 'tip' => __( 'Need front-end profile editing?', 'formidable' ),
249 + 'call' => __( 'Add user registration.', 'formidable' ),
278 250 ),
279 251 array(
280 252 'link' => array(
281 253 'content' => 'twilio-payment',
@@ -280,10 +252,10 @@
280 252 'link' => array(
281 253 'content' => 'twilio-payment',
282 254 'page' => 'twilio-tip',
283 255 ),
284 - 'tip' => __( 'Get SMS alerts for form submissions and payments—just add Twilio.', 'formidable' ),
285 - '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' ),
286 258 ),
287 259 array(
288 260 'link' => array(
289 261 'content' => 'twilio',
@@ -288,10 +260,10 @@
288 260 'link' => array(
289 261 'content' => 'twilio',
290 262 'page' => 'twilio-send-tip',
291 263 ),
292 - 'tip' => __( 'Use Twilio to send SMS when forms are submitted.', 'formidable' ),
293 - 'call' => self::cta_label(),
264 + 'tip' => __( 'Send an SMS message when a form is submitted.', 'formidable' ),
265 + 'call' => __( 'Get the Twilio integration.', 'formidable' ),
294 266 ),
295 267 array(
296 268 'link' => array(
297 269 'content' => 'acf-tip',
@@ -296,12 +268,14 @@
296 268 'link' => array(
297 269 'content' => 'acf-tip',
298 270 'param' => 'acf-tip',
299 271 ),
300 - 'tip' => __( 'Fill Advanced Custom Fields automatically with form entries.', 'formidable' ),
301 - 'call' => self::cta_label(),
272 + 'tip' => __( 'Fill Advanced Custom Fields from a form.', 'formidable' ),
273 + 'call' => __( 'Add ACF Integration', 'formidable' ),
302 274 ),
303 275 );
276 +
277 + return $tips;
304 278 }
305 279
306 280 /**
307 281 * @return array
@@ -306,16 +280,16 @@
306 280 /**
307 281 * @return array
308 282 */
309 283 public static function get_styling_tip() {
310 - return array(
284 + $tips = array(
311 285 array(
312 286 'link' => array(
313 287 'content' => 'style',
314 288 'param' => 'wordpress-visual-form-styler',
315 289 ),
316 - 'tip' => __( 'Make your forms stand out with multiple style templates.', 'formidable' ),
317 - 'call' => self::cta_label(),
290 + 'tip' => __( 'Make your sidebar and footer forms stand out.', 'formidable' ),
291 + 'call' => __( 'Use multiple style templates.', 'formidable' ),
318 292 ),
319 293 array(
320 294 'link' => array(
321 295 'content' => 'style',
@@ -332,8 +306,10 @@
332 306 'tip' => __( 'Want to duplicate a style?', 'formidable' ),
333 307 'call' => self::cta_label(),
334 308 ),
335 309 );
310 +
311 + return $tips;
336 312 }
337 313
338 314 /**
339 315 * @return array
@@ -344,10 +320,10 @@
344 320 'link' => array(
345 321 'content' => 'entries',
346 322 'param' => 'form-entry-management-wordpress',
347 323 ),
348 - 'tip' => __( 'Edit form entries anytime with entry management.', 'formidable' ),
349 - 'call' => self::cta_label(),
324 + 'tip' => __( 'Want to edit form submissions?', 'formidable' ),
325 + 'call' => __( 'Add entry management.', 'formidable' ),
350 326 ),
351 327 array(
352 328 'link' => array(
353 329 'content' => 'entries-search',
@@ -360,14 +336,15 @@
360 336 'link' => array(
361 337 'content' => 'views',
362 338 'param' => 'views-display-form-data',
363 339 ),
364 - 'tip' => __( 'Turn entries into dynamic content — no code needed.', 'formidable' ),
365 - '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' ),
366 342 ),
367 343 );
344 + $tips = array_merge( $tips, self::get_import_tip() );
368 345
369 - return array_merge( $tips, self::get_import_tip() );
346 + return $tips;
370 347 }
371 348
372 349 /**
373 350 * @return array
@@ -372,9 +349,9 @@
372 349 /**
373 350 * @return array
374 351 */
375 352 public static function get_import_tip() {
376 - return array(
353 + $tips = array(
377 354 array(
378 355 'link' => array(
379 356 'content' => 'import',
380 357 'param' => 'importing-exporting-wordpress-forms',
@@ -382,23 +359,52 @@
382 359 'tip' => __( 'Want to import entries into your forms?', 'formidable' ),
383 360 'call' => self::cta_label(),
384 361 ),
385 362 );
363 +
364 + return $tips;
386 365 }
387 366
388 367 /**
389 - * @param array $tips
390 - *
391 368 * @return array
392 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 +
393 404 public static function get_random_tip( $tips ) {
394 - $count = count( $tips );
405 + $random = rand( 0, count( $tips ) - 1 );
395 406
396 - if ( $count === 0 ) {
397 - return array();
398 - }
399 -
400 - $random = random_int( 0, $count - 1 );
401 407 return $tips[ $random ];
402 408 }
403 409
404 410 /**
@@ -432,9 +438,8 @@
432 438 'link_text' => '',
433 439 'link_url' => '#',
434 440 'class' => '',
435 441 'id' => '',
436 - 'target' => '_blank',
437 442 );
438 443
439 444 $args = wp_parse_args( $args, $defaults );
440 445
@@ -446,16 +451,6 @@
446 451 $attributes['id'] = $args['id'];
447 452 }
448 453
449 454 require FrmAppHelper::plugin_path() . '/classes/views/shared/admin-cta.php';
450 - }
451 -
452 - /**
453 - * @deprecated 6.21
454 - *
455 - * @return array
456 - */
457 - public static function get_banner_tip() {
458 - _deprecated_function( __METHOD__, '6.21' );
459 - return array();
460 455 }
461 456 }