PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.16
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.16
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 +113 -95 6.336.16 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,13 +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 );
60 - // phpcs:disable Generic.WhiteSpace.ScopeIndent
58 + $link = empty( $tip['link'] ) ? $tip['page'] : FrmAppHelper::admin_upgrade_link( $tip['link'], $tip['page'] );
61 59 ?>
62 - <a href="<?php echo esc_url( $link ); ?>" <?php echo ! empty( $tip['link'] ) ? 'target="_blank"' : ''; ?> class="frm_pro_tip frm-gradient">
63 - <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' ) ); ?>
64 62
65 63 <?php if ( isset( $tip['call'] ) ) { ?>
66 64 <span class="frm-tip-info">
67 65 <?php echo esc_html( $tip['tip'] ); ?>
@@ -66,14 +64,13 @@
66 64 <span class="frm-tip-info">
67 65 <?php echo esc_html( $tip['tip'] ); ?>
68 66 </span>
69 67 <?php } ?>
70 - <span class="frm-tip-cta">
68 + <a href="<?php echo esc_url( $link ); ?>" <?php echo empty( $tip['link'] ) ? '' : 'target="_blank"'; ?> class="frm-tip-cta">
71 69 <?php echo esc_html( $tip['call'] ? $tip['call'] : $tip['tip'] ); ?>
72 - </span>
73 - </a>
70 + </a>
71 + </span>
74 72 <?php
75 - // phpcs:enable Generic.WhiteSpace.ScopeIndent
76 73
77 74 if ( 'p' === $html ) {
78 75 echo '</p>';
79 76 }
@@ -79,33 +76,8 @@
79 76 }
80 77 }
81 78
82 79 /**
83 - * @since 6.21
84 - *
85 - * @param array $tip
86 - *
87 - * @return string
88 - */
89 - private static function get_tip_link( $tip ) {
90 - if ( empty( $tip['tip'] ) ) {
91 - return $tip['page'];
92 - }
93 -
94 - $cta_link = FrmSalesApi::get_best_sale_value( 'pro_tip_cta_link' );
95 -
96 - if ( $cta_link ) {
97 - if ( is_array( $tip['link'] ) ) {
98 - return FrmAppHelper::maybe_add_missing_utm( $cta_link, $tip['link'] );
99 - }
100 -
101 - return $cta_link;
102 - }
103 -
104 - return FrmAppHelper::admin_upgrade_link( $tip['link'], $tip['page'] );
105 - }
106 -
107 - /**
108 80 * Use the correct label for the license.
109 81 *
110 82 * @since 6.5.1
111 83 *
@@ -111,14 +83,8 @@
111 83 *
112 84 * @return string
113 85 */
114 86 private static function cta_label() {
115 - $cta_text = FrmSalesApi::get_best_sale_value( 'pro_tip_cta_text' );
116 -
117 - if ( $cta_text ) {
118 - return $cta_text;
119 - }
120 -
121 87 return FrmAddonsController::is_license_expired() ? __( 'Renew', 'formidable' ) : __( 'Upgrade to Pro.', 'formidable' );
122 88 }
123 89
124 90 /**
@@ -124,9 +90,9 @@
124 90 /**
125 91 * @return array
126 92 */
127 93 public static function get_builder_tip() {
128 - return array(
94 + $tips = array(
129 95 array(
130 96 'link' => array(
131 97 'content' => 'conditional-logic',
132 98 'param' => 'conditional-logic-wordpress-forms',
@@ -138,10 +104,10 @@
138 104 'link' => array(
139 105 'content' => 'confirmation-fields',
140 106 'param' => 'confirmation-fields-wordpress-forms',
141 107 ),
142 - 'tip' => __( 'Eliminate input errors with email confirmation fields.', 'formidable' ),
143 - 'call' => self::cta_label(),
108 + 'tip' => __( 'Want to stop losing leads from email typos?', 'formidable' ),
109 + 'call' => __( 'Add email confirmation fields.', 'formidable' ),
144 110 ),
145 111 array(
146 112 'link' => array(
147 113 'content' => 'page-breaks',
@@ -154,9 +120,17 @@
154 120 'link' => array(
155 121 'content' => 'file-uploads',
156 122 'param' => 'wordpress-multi-file-upload-fields',
157 123 ),
158 - 'tip' => __( 'Skip the follow-ups. Let users upload files.', 'formidable' ),
124 + 'tip' => __( 'Cut down on back-and-forth with clients.', 'formidable' ),
125 + 'call' => __( 'Allow file uploads in your form.', 'formidable' ),
126 + ),
127 + array(
128 + 'link' => array(
129 + 'content' => 'calculations',
130 + 'param' => 'field-calculations-wordpress-form',
131 + ),
132 + 'tip' => __( 'Need to calculate a total?', 'formidable' ),
159 133 'call' => self::cta_label(),
160 134 ),
161 135 array(
162 136 'link' => array(
@@ -162,12 +136,14 @@
162 136 'link' => array(
163 137 'content' => 'prefill-fields',
164 138 'param' => 'auto-fill-forms',
165 139 ),
166 - 'tip' => __( 'Save time with autofill forms.', 'formidable' ),
167 - 'call' => self::cta_label(),
140 + 'tip' => __( 'Save time.', 'formidable' ),
141 + 'call' => __( 'Fill out forms automatically!', 'formidable' ),
168 142 ),
169 143 );
144 +
145 + return $tips;
170 146 }
171 147
172 148 /**
173 149 * @return array
@@ -172,16 +148,16 @@
172 148 /**
173 149 * @return array
174 150 */
175 151 public static function get_form_settings_tip() {
176 - return array(
152 + $tips = array(
177 153 array(
178 154 'link' => array(
179 155 'content' => 'front-edit-b',
180 156 'param' => 'wordpress-front-end-editing',
181 157 ),
182 - 'tip' => __( 'Make your site dynamic. Enable front-end editing.', 'formidable' ),
183 - 'call' => self::cta_label(),
158 + 'tip' => __( 'A site with dynamic, user-generated content is within reach.', 'formidable' ),
159 + 'call' => __( 'Add front-end editing.', 'formidable' ),
184 160 ),
185 161 array(
186 162 'link' => array(
187 163 'content' => 'save-drafts',
@@ -186,10 +162,10 @@
186 162 'link' => array(
187 163 'content' => 'save-drafts',
188 164 'param' => 'save-drafts-wordpress-form',
189 165 ),
190 - 'tip' => __( 'Long form? Let users save and finish later', 'formidable' ),
191 - 'call' => self::cta_label(),
166 + 'tip' => __( 'Have long forms?', 'formidable' ),
167 + 'call' => __( 'Let users save drafts and return later!', 'formidable' ),
192 168 ),
193 169 array(
194 170 'link' => array(
195 171 'content' => 'form-scheduling',
@@ -194,12 +170,14 @@
194 170 'link' => array(
195 171 'content' => 'form-scheduling',
196 172 'param' => 'schedule-forms-wordpress',
197 173 ),
198 - 'tip' => __( 'Limit form access with built-in scheduling.', 'formidable' ),
199 - 'call' => self::cta_label(),
174 + 'tip' => __( 'Want your form open only for a certain time period?', 'formidable' ),
175 + 'call' => __( 'Add form scheduling.', 'formidable' ),
200 176 ),
201 177 );
178 +
179 + return $tips;
202 180 }
203 181
204 182 /**
205 183 * @return array
@@ -204,16 +182,16 @@
204 182 /**
205 183 * @return array
206 184 */
207 185 public static function get_form_action_tip() {
208 - return array(
186 + $tips = array(
209 187 array(
210 188 'link' => array(
211 189 'content' => 'email-routing',
212 190 'param' => 'virtually-unlimited-emails',
213 191 ),
214 - 'tip' => __( 'Save time — route emails to the right person automatically.', 'formidable' ),
215 - 'call' => self::cta_label(),
192 + 'tip' => __( 'Save time by sending the email to the right person automatically.', 'formidable' ),
193 + 'call' => __( 'Add email routing.', 'formidable' ),
216 194 ),
217 195 array(
218 196 'link' => array(
219 197 'content' => 'create-posts',
@@ -234,13 +212,29 @@
234 212 'link' => array(
235 213 'content' => 'mailchimp',
236 214 'page' => 'mailchimp-tip',
237 215 ),
238 - 'tip' => __( 'Send leads to Mailchimp for instant email follow-up.', 'formidable' ),
239 - 'call' => self::cta_label(),
216 + 'tip' => __( 'Grow your business with automated email follow-up.', 'formidable' ),
217 + 'call' => __( 'Send leads straight to Mailchimp.', 'formidable' ),
240 218 ),
241 219 array(
242 220 'link' => array(
221 + 'content' => 'paypal-revenue',
222 + 'page' => 'paypal-increase-revenue-tip',
223 + ),
224 + 'tip' => __( 'Increase revenue.', 'formidable' ),
225 + 'call' => __( 'Use PayPal with this form.', 'formidable' ),
226 + ),
227 + array(
228 + 'link' => array(
229 + 'content' => 'paypal-fast',
230 + 'page' => 'paypal-save-time-tip',
231 + ),
232 + 'tip' => __( 'Get paid instantly.', 'formidable' ),
233 + 'call' => __( 'Use Paypal with this form.', 'formidable' ),
234 + ),
235 + array(
236 + 'link' => array(
243 237 'content' => 'registration',
244 238 'page' => 'registration-tip',
245 239 ),
246 240 'tip' => __( 'Automatically create user accounts.', 'formidable' ),
@@ -250,10 +244,10 @@
250 244 'link' => array(
251 245 'content' => 'profile',
252 246 'page' => 'registration-profile-editing-tip',
253 247 ),
254 - 'tip' => __( 'Enable front-end profile editing with User Registration.', 'formidable' ),
255 - 'call' => self::cta_label(),
248 + 'tip' => __( 'Need front-end profile editing?', 'formidable' ),
249 + 'call' => __( 'Add user registration.', 'formidable' ),
256 250 ),
257 251 array(
258 252 'link' => array(
259 253 'content' => 'twilio-payment',
@@ -258,10 +252,10 @@
258 252 'link' => array(
259 253 'content' => 'twilio-payment',
260 254 'page' => 'twilio-tip',
261 255 ),
262 - 'tip' => __( 'Get SMS alerts for form submissions and payments—just add Twilio.', 'formidable' ),
263 - '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' ),
264 258 ),
265 259 array(
266 260 'link' => array(
267 261 'content' => 'twilio',
@@ -266,10 +260,10 @@
266 260 'link' => array(
267 261 'content' => 'twilio',
268 262 'page' => 'twilio-send-tip',
269 263 ),
270 - 'tip' => __( 'Use Twilio to send SMS when forms are submitted.', 'formidable' ),
271 - 'call' => self::cta_label(),
264 + 'tip' => __( 'Send an SMS message when a form is submitted.', 'formidable' ),
265 + 'call' => __( 'Get the Twilio integration.', 'formidable' ),
272 266 ),
273 267 array(
274 268 'link' => array(
275 269 'content' => 'acf-tip',
@@ -274,12 +268,14 @@
274 268 'link' => array(
275 269 'content' => 'acf-tip',
276 270 'param' => 'acf-tip',
277 271 ),
278 - 'tip' => __( 'Fill Advanced Custom Fields automatically with form entries.', 'formidable' ),
279 - 'call' => self::cta_label(),
272 + 'tip' => __( 'Fill Advanced Custom Fields from a form.', 'formidable' ),
273 + 'call' => __( 'Add ACF Integration', 'formidable' ),
280 274 ),
281 275 );
276 +
277 + return $tips;
282 278 }
283 279
284 280 /**
285 281 * @return array
@@ -284,16 +280,16 @@
284 280 /**
285 281 * @return array
286 282 */
287 283 public static function get_styling_tip() {
288 - return array(
284 + $tips = array(
289 285 array(
290 286 'link' => array(
291 287 'content' => 'style',
292 288 'param' => 'wordpress-visual-form-styler',
293 289 ),
294 - 'tip' => __( 'Make your forms stand out with multiple style templates.', 'formidable' ),
295 - 'call' => self::cta_label(),
290 + 'tip' => __( 'Make your sidebar and footer forms stand out.', 'formidable' ),
291 + 'call' => __( 'Use multiple style templates.', 'formidable' ),
296 292 ),
297 293 array(
298 294 'link' => array(
299 295 'content' => 'style',
@@ -310,8 +306,10 @@
310 306 'tip' => __( 'Want to duplicate a style?', 'formidable' ),
311 307 'call' => self::cta_label(),
312 308 ),
313 309 );
310 +
311 + return $tips;
314 312 }
315 313
316 314 /**
317 315 * @return array
@@ -322,10 +320,10 @@
322 320 'link' => array(
323 321 'content' => 'entries',
324 322 'param' => 'form-entry-management-wordpress',
325 323 ),
326 - 'tip' => __( 'Edit form entries anytime with entry management.', 'formidable' ),
327 - 'call' => self::cta_label(),
324 + 'tip' => __( 'Want to edit form submissions?', 'formidable' ),
325 + 'call' => __( 'Add entry management.', 'formidable' ),
328 326 ),
329 327 array(
330 328 'link' => array(
331 329 'content' => 'entries-search',
@@ -338,14 +336,15 @@
338 336 'link' => array(
339 337 'content' => 'views',
340 338 'param' => 'views-display-form-data',
341 339 ),
342 - 'tip' => __( 'Turn entries into dynamic content — no code needed.', 'formidable' ),
343 - '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' ),
344 342 ),
345 343 );
344 + $tips = array_merge( $tips, self::get_import_tip() );
346 345
347 - return array_merge( $tips, self::get_import_tip() );
346 + return $tips;
348 347 }
349 348
350 349 /**
351 350 * @return array
@@ -350,9 +349,9 @@
350 349 /**
351 350 * @return array
352 351 */
353 352 public static function get_import_tip() {
354 - return array(
353 + $tips = array(
355 354 array(
356 355 'link' => array(
357 356 'content' => 'import',
358 357 'param' => 'importing-exporting-wordpress-forms',
@@ -360,23 +359,52 @@
360 359 'tip' => __( 'Want to import entries into your forms?', 'formidable' ),
361 360 'call' => self::cta_label(),
362 361 ),
363 362 );
363 +
364 + return $tips;
364 365 }
365 366
366 367 /**
367 - * @param array $tips
368 - *
369 368 * @return array
370 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 +
371 404 public static function get_random_tip( $tips ) {
372 - $count = count( $tips );
405 + $random = rand( 0, count( $tips ) - 1 );
373 406
374 - if ( $count === 0 ) {
375 - return array();
376 - }
377 -
378 - $random = random_int( 0, $count - 1 );
379 407 return $tips[ $random ];
380 408 }
381 409
382 410 /**
@@ -424,16 +452,6 @@
424 452 $attributes['id'] = $args['id'];
425 453 }
426 454
427 455 require FrmAppHelper::plugin_path() . '/classes/views/shared/admin-cta.php';
428 - }
429 -
430 - /**
431 - * @deprecated 6.21
432 - *
433 - * @return array
434 - */
435 - public static function get_banner_tip() {
436 - _deprecated_function( __METHOD__, '6.21' );
437 - return array();
438 456 }
439 457 }