PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 3.06.06
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v3.06.06
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 +63 -139 6.43.06.06 View file →
@@ -1,17 +1,8 @@
1 1 <?php
2 -if ( ! defined( 'ABSPATH' ) ) {
3 - die( 'You are not allowed to call this page directly.' );
4 -}
5 2
6 3 class FrmTipsHelper {
7 4
8 - /**
9 - * @param string $callback
10 - * @param string $html
11 - *
12 - * @return void
13 - */
14 5 public static function pro_tip( $callback, $html = '' ) {
15 6 if ( FrmAppHelper::pro_is_installed() ) {
16 7 return;
17 8 }
@@ -16,77 +7,44 @@
16 7 return;
17 8 }
18 9
19 10 $tips = self::$callback();
20 - $tip = self::get_random_tip( $tips );
11 + $tip = self::get_random_tip( $tips );
21 12
22 - self::show_tip( $tip );
23 - }
13 + if ( 'p' === $html ) {
14 + echo '<p>';
15 + }
24 16
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 17 if ( ! isset( $tip['page'] ) ) {
45 18 $tip['page'] = '';
46 19 }
47 - if ( isset( $tip['link'] ) && ! isset( $tip['link']['medium'] ) ) {
20 + if ( ! isset( $tip['link']['medium'] ) ) {
48 21 $tip['link']['medium'] = 'tip';
49 22 }
50 23
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'] );
24 + $link = FrmAppHelper::make_affiliate_url( FrmAppHelper::admin_upgrade_link( $tip['link'], $tip['page'] ) );
56 25 ?>
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' ) ); ?>
59 -
26 + <a href="<?php echo esc_url( $link ); ?>" target="_blank" class="frm_pro_tip">
27 + <span>
28 + <i class="frm_icon_font frm_check1_icon"></i> <?php esc_html_e( 'Pro Tip:', 'formidable' ); ?>
29 + </span>
30 + <?php echo esc_html( $tip['tip'] ) ?>
60 31 <?php if ( isset( $tip['call'] ) ) { ?>
61 - <span class="frm-tip-info">
62 - <?php echo esc_html( $tip['tip'] ); ?>
63 - </span>
64 - <span class="frm-tip-cta">
65 - <?php echo esc_html( $tip['call'] ); ?>
66 - </span>
67 - <?php } else { ?>
68 - <span class="frm-tip-cta">
69 - <?php echo esc_html( $tip['tip'] ); ?>
70 - </span>
32 + <span><?php echo esc_html( $tip['call'] ) ?></span>
71 33 <?php } ?>
72 34 </a>
73 35 <?php
74 -
75 36 if ( 'p' === $html ) {
76 37 echo '</p>';
77 38 }
78 39 }
79 40
80 - /**
81 - * @return array
82 - */
83 41 public static function get_builder_tip() {
84 42 $tips = array(
85 43 array(
86 44 'link' => array(
87 45 'content' => 'conditional-logic',
88 - 'param' => 'conditional-logic-wordpress-forms',
46 + 'anchor' => 'feature-conditional-logic-wordpress-forms',
89 47 ),
90 48 'tip' => __( 'Use conditional logic to shorten your forms and increase conversions.', 'formidable' ),
91 49 'call' => __( 'Upgrade to Pro.', 'formidable' ),
92 50 ),
@@ -92,9 +50,9 @@
92 50 ),
93 51 array(
94 52 'link' => array(
95 53 'content' => 'confirmation-fields',
96 - 'param' => 'confirmation-fields-wordpress-forms',
54 + 'anchor' => 'feature-confirm-email-address-password-wordpress-form',
97 55 ),
98 56 'tip' => __( 'Want to stop losing leads from email typos?', 'formidable' ),
99 57 'call' => __( 'Add email confirmation fields.', 'formidable' ),
100 58 ),
@@ -100,17 +58,17 @@
100 58 ),
101 59 array(
102 60 'link' => array(
103 61 'content' => 'page-breaks',
104 - 'param' => 'wordpress-multi-page-forms',
62 + 'anchor' => 'feature-wordpress-multi-step-form',
105 63 ),
106 - 'tip' => __( 'Use page breaks for easier forms.', 'formidable' ),
107 - 'call' => __( 'Upgrade to Pro.', 'formidable' ),
64 + 'tip' => __( 'Stop intimidating users with long forms.', 'formidable' ),
65 + 'call' => __( 'Use page breaks.', 'formidable' ),
108 66 ),
109 67 array(
110 68 'link' => array(
111 69 'content' => 'file-uploads',
112 - 'param' => 'wordpress-multi-file-upload-fields',
70 + 'anchor' => 'feature-wordpress-multiple-file-upload-form',
113 71 ),
114 72 'tip' => __( 'Cut down on back-and-forth with clients.', 'formidable' ),
115 73 'call' => __( 'Allow file uploads in your form.', 'formidable' ),
116 74 ),
@@ -116,9 +74,9 @@
116 74 ),
117 75 array(
118 76 'link' => array(
119 77 'content' => 'calculations',
120 - 'param' => 'field-calculations-wordpress-form',
78 + 'anchor' => 'feature-wordpress-calculated-fields-form',
121 79 ),
122 80 'tip' => __( 'Need to calculate a total?', 'formidable' ),
123 81 'call' => __( 'Upgrade to Pro.', 'formidable' ),
124 82 ),
@@ -124,12 +82,12 @@
124 82 ),
125 83 array(
126 84 'link' => array(
127 85 'content' => 'prefill-fields',
128 - 'param' => 'auto-fill-forms',
86 + 'anchor' => 'feature-fill-out-forms-automatically',
129 87 ),
130 88 'tip' => __( 'Save time.', 'formidable' ),
131 - 'call' => __( 'Fill out forms automatically!', 'formidable' ),
89 + 'call' => __( 'Prefill fields with user info.', 'formidable' ),
132 90 ),
133 91 );
134 92
135 93 return $tips;
@@ -134,17 +92,14 @@
134 92
135 93 return $tips;
136 94 }
137 95
138 - /**
139 - * @return array
140 - */
141 96 public static function get_form_settings_tip() {
142 97 $tips = array(
143 98 array(
144 99 'link' => array(
145 100 'content' => 'front-edit-b',
146 - 'param' => 'wordpress-front-end-editing',
101 + 'anchor' => 'feature-user-submitted-posts-wordpress-forms',
147 102 ),
148 103 'tip' => __( 'A site with dynamic, user-generated content is within reach.', 'formidable' ),
149 104 'call' => __( 'Add front-end editing.', 'formidable' ),
150 105 ),
@@ -150,35 +105,37 @@
150 105 ),
151 106 array(
152 107 'link' => array(
153 108 'content' => 'save-drafts',
154 - 'param' => 'save-drafts-wordpress-form',
109 + 'anchor' => 'feature-user-submitted-posts-wordpress-forms',
155 110 ),
156 - 'tip' => __( 'Have long forms?', 'formidable' ),
157 - 'call' => __( 'Let users save drafts and return later!', 'formidable' ),
111 + 'tip' => __( 'Have a long form that takes time to complete?', 'formidable' ),
112 + 'call' => __( 'Let logged-in users save a draft and return later.', 'formidable' ),
158 113 ),
159 114 array(
160 115 'link' => array(
116 + 'content' => 'ajax',
117 + ),
118 + 'tip' => __( 'Want to submit forms without reloading the page?', 'formidable' ),
119 + 'call' => __( 'Get ajax form submit.', 'formidable' ),
120 + ),
121 + array(
122 + 'link' => array(
161 123 'content' => 'form-scheduling',
162 - 'param' => 'schedule-forms-wordpress',
163 124 ),
164 - 'tip' => __( 'Want your form open only for a certain time period?', 'formidable' ),
125 + 'tip' => __( 'Need to open and close your form on specific days?', 'formidable' ),
165 126 'call' => __( 'Add form scheduling.', 'formidable' ),
166 127 ),
167 128 );
168 -
169 129 return $tips;
170 130 }
171 131
172 - /**
173 - * @return array
174 - */
175 132 public static function get_form_action_tip() {
176 133 $tips = array(
177 134 array(
178 135 'link' => array(
179 136 'content' => 'email-routing',
180 - 'param' => 'virtually-unlimited-emails',
137 + 'anchor' => 'feature-email-autoresponders-wordpress',
181 138 ),
182 139 'tip' => __( 'Save time by sending the email to the right person automatically.', 'formidable' ),
183 140 'call' => __( 'Add email routing.', 'formidable' ),
184 141 ),
@@ -184,9 +141,9 @@
184 141 ),
185 142 array(
186 143 'link' => array(
187 144 'content' => 'create-posts',
188 - 'param' => 'create-posts-pages-wordpress-forms',
145 + 'anchor' => 'feature-user-submitted-posts-wordpress-forms',
189 146 ),
190 147 'tip' => __( 'Create blog posts or pages from the front-end.', 'formidable' ),
191 148 'call' => __( 'Upgrade to Pro.', 'formidable' ),
192 149 ),
@@ -192,11 +149,11 @@
192 149 ),
193 150 array(
194 151 'link' => array(
195 152 'content' => 'user-submit',
196 - 'param' => 'create-posts-pages-wordpress-forms',
153 + 'anchor' => 'feature-user-submitted-posts-wordpress-forms',
197 154 ),
198 - 'tip' => __( 'Let your users submit posts on the front-end.', 'formidable' ),
155 + 'tip' => __( 'Make front-end posting easy.', 'formidable' ),
199 156 'call' => __( 'Upgrade to Pro.', 'formidable' ),
200 157 ),
201 158 array(
202 159 'link' => array(
@@ -203,12 +160,20 @@
203 160 'content' => 'mailchimp',
204 161 'page' => 'mailchimp-tip',
205 162 ),
206 163 'tip' => __( 'Grow your business with automated email follow-up.', 'formidable' ),
207 - 'call' => __( 'Send leads straight to Mailchimp.', 'formidable' ),
164 + 'call' => __( 'Send leads straight to MailChimp.', 'formidable' ),
208 165 ),
209 166 array(
210 167 'link' => array(
168 + 'content' => 'paypal',
169 + 'page' => 'paypal-tip',
170 + ),
171 + 'tip' => __( 'Save hours and increase revenue by collecting payments with every submission.', 'formidable' ),
172 + 'call' => __( 'Use PayPal with this form.', 'formidable' ),
173 + ),
174 + array(
175 + 'link' => array(
211 176 'content' => 'paypal-revenue',
212 177 'page' => 'paypal-increase-revenue-tip',
213 178 ),
214 179 'tip' => __( 'Increase revenue.', 'formidable' ),
@@ -226,10 +191,10 @@
226 191 'link' => array(
227 192 'content' => 'registration',
228 193 'page' => 'registration-tip',
229 194 ),
230 - 'tip' => __( 'Automatically create user accounts.', 'formidable' ),
231 - 'call' => __( 'Upgrade to boost your site membership.', 'formidable' ),
195 + 'tip' => __( 'Boost your site membership.', 'formidable' ),
196 + 'call' => __( 'Automatically create user accounts.', 'formidable' ),
232 197 ),
233 198 array(
234 199 'link' => array(
235 200 'content' => 'profile',
@@ -234,9 +199,9 @@
234 199 'link' => array(
235 200 'content' => 'profile',
236 201 'page' => 'registration-profile-editing-tip',
237 202 ),
238 - 'tip' => __( 'Need front-end profile editing?', 'formidable' ),
203 + 'tip' => __( 'Make front-end profile editing possible.', 'formidable' ),
239 204 'call' => __( 'Add user registration.', 'formidable' ),
240 205 ),
241 206 array(
242 207 'link' => array(
@@ -242,10 +207,10 @@
242 207 'link' => array(
243 208 'content' => 'twilio-payment',
244 209 'page' => 'twilio-tip',
245 210 ),
246 - 'tip' => __( 'Want an SMS notification when a form is submitted or a payment received?', 'formidable' ),
247 - 'call' => __( 'Get the Twilio integration.', 'formidable' ),
211 + 'tip' => __( 'Want a text when this form is submitted or when a payment is received?', 'formidable' ),
212 + 'call' => __( 'Use Twilio with this form.', 'formidable' ),
248 213 ),
249 214 array(
250 215 'link' => array(
251 216 'content' => 'twilio',
@@ -250,67 +215,36 @@
250 215 'link' => array(
251 216 'content' => 'twilio',
252 217 'page' => 'twilio-send-tip',
253 218 ),
254 - 'tip' => __( 'Send an SMS message when a form is submitted.', 'formidable' ),
255 - 'call' => __( 'Get the Twilio integration.', 'formidable' ),
219 + 'tip' => __( 'Send a text when this form is submitted.', 'formidable' ),
220 + 'call' => __( 'Get Twilio.', 'formidable' ),
256 221 ),
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 222 );
266 223
267 224 return $tips;
268 225 }
269 226
270 - /**
271 - * @return array
272 - */
273 227 public static function get_styling_tip() {
274 228 $tips = array(
275 229 array(
276 230 'link' => array(
277 231 'content' => 'style',
278 - 'param' => 'wordpress-visual-form-styler',
232 + 'anchor' => 'feature-wordpress-visual-form-styler',
279 233 ),
280 - 'tip' => __( 'Make your sidebar and footer forms stand out.', 'formidable' ),
234 + 'tip' => __( 'Make your sidebar or footer form stand out.', 'formidable' ),
281 235 'call' => __( 'Use multiple style templates.', 'formidable' ),
282 236 ),
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 237 );
300 -
301 238 return $tips;
302 239 }
303 240
304 - /**
305 - * @return array
306 - */
307 241 public static function get_entries_tip() {
308 242 $tips = array(
309 243 array(
310 244 'link' => array(
311 245 'content' => 'entries',
312 - 'param' => 'form-entry-management-wordpress',
246 + 'anchor' => 'feature-form-entry-management-wordpress',
313 247 ),
314 248 'tip' => __( 'Want to edit form submissions?', 'formidable' ),
315 249 'call' => __( 'Add entry management.', 'formidable' ),
316 250 ),
@@ -316,9 +250,9 @@
316 250 ),
317 251 array(
318 252 'link' => array(
319 253 'content' => 'entries-search',
320 - 'param' => 'form-entry-management-wordpress',
254 + 'anchor' => 'feature-form-entry-management-wordpress',
321 255 ),
322 256 'tip' => __( 'Want to search submitted entries?', 'formidable' ),
323 257 'call' => __( 'Upgrade to Pro.', 'formidable' ),
324 258 ),
@@ -324,9 +258,9 @@
324 258 ),
325 259 array(
326 260 'link' => array(
327 261 'content' => 'views',
328 - 'param' => 'views-display-form-data',
262 + 'anchor' => 'feature-display-form-data-views',
329 263 ),
330 264 'tip' => __( 'A site with dynamic, user-generated content is within reach.', 'formidable' ),
331 265 'call' => __( 'Display form data with Views.', 'formidable' ),
332 266 ),
@@ -331,35 +265,27 @@
331 265 'call' => __( 'Display form data with Views.', 'formidable' ),
332 266 ),
333 267 );
334 268 $tips = array_merge( $tips, self::get_import_tip() );
335 -
336 269 return $tips;
337 270 }
338 271
339 - /**
340 - * @return array
341 - */
342 272 public static function get_import_tip() {
343 273 $tips = array(
344 274 array(
345 275 'link' => array(
346 276 'content' => 'import',
347 - 'param' => 'importing-exporting-wordpress-forms',
277 + 'anchor' => 'feature-importing-exporting-wordpress-forms',
348 278 ),
349 279 'tip' => __( 'Want to import entries into your forms?', 'formidable' ),
350 280 'call' => __( 'Upgrade to Pro.', 'formidable' ),
351 281 ),
352 282 );
353 -
354 283 return $tips;
355 284 }
356 285
357 - /**
358 - * @return array
359 - */
360 286 public static function get_banner_tip() {
361 - $tips = array(
287 + $tips = array(
362 288 array(
363 289 'link' => array(
364 290 'medium' => 'banner',
365 291 'content' => 'professional-results',
@@ -380,20 +306,18 @@
380 306 'medium' => 'banner',
381 307 'content' => 'automate',
382 308 ),
383 309 'tip' => __( 'Automate your business and increase revenue.', 'formidable' ),
384 - 'call' => __( 'Collect instant payments, and send leads to Mailchimp.', 'formidable' ),
310 + 'call' => __( 'Collect instant payments, and send leads to MailChimp.', 'formidable' ),
385 311 ),
386 312 );
387 - $random = rand( 0, count( $tips ) - 1 );
388 - $tip = $tips[ $random ];
313 + $random = rand( 0, count( $tips ) - 1 );
314 + $tip = $tips[ $random ];
389 315 $tip['num'] = $random;
390 -
391 316 return $tip;
392 317 }
393 318
394 319 public static function get_random_tip( $tips ) {
395 320 $random = rand( 0, count( $tips ) - 1 );
396 -
397 321 return $tips[ $random ];
398 322 }
399 323 }