PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.0.14
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.0.14
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 +18 -78 6.55.0.14 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,53 +12,29 @@
18 12
19 13 $tips = self::$callback();
20 14 $tip = self::get_random_tip( $tips );
21 15
22 - self::show_tip( $tip, $html );
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 - $defaults = array(
45 - 'page' => '',
46 - 'class' => 'frm-mt-0',
47 - );
48 - $tip = array_merge( $defaults, $tip );
49 -
50 - if ( isset( $tip['link'] ) && ! isset( $tip['link']['medium'] ) ) {
20 + if ( ! isset( $tip['page'] ) ) {
21 + $tip['page'] = '';
22 + }
23 + if ( ! isset( $tip['link']['medium'] ) ) {
51 24 $tip['link']['medium'] = 'tip';
52 25 }
53 26
54 - if ( 'p' === $html ) {
55 - echo '<p class="frmcenter ' . esc_attr( $tip['class'] ) . '">';
56 - }
57 -
58 - $link = empty( $tip['link'] ) ? $tip['page'] : FrmAppHelper::admin_upgrade_link( $tip['link'], $tip['page'] );
27 + $link = FrmAppHelper::admin_upgrade_link( $tip['link'], $tip['page'] );
59 28 ?>
60 - <a href="<?php echo esc_url( $link ); ?>" <?php echo empty( $tip['link'] ) ? '' : 'target="_blank"'; ?> class="frm_pro_tip">
61 - <?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>
62 34
63 35 <?php if ( isset( $tip['call'] ) ) { ?>
64 - <span class="frm-tip-info">
65 - <?php echo esc_html( $tip['tip'] ); ?>
66 - </span>
36 + <?php echo esc_html( $tip['tip'] ); ?>
67 37 <span class="frm-tip-cta">
68 38 <?php echo esc_html( $tip['call'] ); ?>
69 39 </span>
70 40 <?php } else { ?>
@@ -73,17 +43,13 @@
73 43 </span>
74 44 <?php } ?>
75 45 </a>
76 46 <?php
77 -
78 47 if ( 'p' === $html ) {
79 48 echo '</p>';
80 49 }
81 50 }
82 51
83 - /**
84 - * @return array
85 - */
86 52 public static function get_builder_tip() {
87 53 $tips = array(
88 54 array(
89 55 'link' => array(
@@ -137,11 +103,8 @@
137 103
138 104 return $tips;
139 105 }
140 106
141 - /**
142 - * @return array
143 - */
144 107 public static function get_form_settings_tip() {
145 108 $tips = array(
146 109 array(
147 110 'link' => array(
@@ -171,11 +134,8 @@
171 134
172 135 return $tips;
173 136 }
174 137
175 - /**
176 - * @return array
177 - */
178 138 public static function get_form_action_tip() {
179 139 $tips = array(
180 140 array(
181 141 'link' => array(
@@ -206,9 +166,9 @@
206 166 'content' => 'mailchimp',
207 167 'page' => 'mailchimp-tip',
208 168 ),
209 169 'tip' => __( 'Grow your business with automated email follow-up.', 'formidable' ),
210 - 'call' => __( 'Send leads straight to Mailchimp.', 'formidable' ),
170 + 'call' => __( 'Send leads straight to MailChimp.', 'formidable' ),
211 171 ),
212 172 array(
213 173 'link' => array(
214 174 'content' => 'paypal-revenue',
@@ -256,24 +216,13 @@
256 216 ),
257 217 'tip' => __( 'Send an SMS message when a form is submitted.', 'formidable' ),
258 218 'call' => __( 'Get the Twilio integration.', 'formidable' ),
259 219 ),
260 - array(
261 - 'link' => array(
262 - 'content' => 'acf-tip',
263 - 'param' => 'acf-tip',
264 - ),
265 - 'tip' => __( 'Fill Advanced Custom Fields from a form.', 'formidable' ),
266 - 'call' => __( 'Add ACF Integration', 'formidable' ),
267 - ),
268 220 );
269 221
270 222 return $tips;
271 223 }
272 224
273 - /**
274 - * @return array
275 - */
276 225 public static function get_styling_tip() {
277 226 $tips = array(
278 227 array(
279 228 'link' => array(
@@ -293,11 +242,11 @@
293 242 ),
294 243 array(
295 244 'link' => array(
296 245 'content' => 'style',
297 - 'param' => 'duplicate-style',
246 + 'param' => 'bg-image-style-settings',
298 247 ),
299 - 'tip' => __( 'Want to duplicate a style?', 'formidable' ),
248 + 'tip' => __( 'Want to set a color with an alpha slider?', 'formidable' ),
300 249 'call' => __( 'Upgrade to Pro.', 'formidable' ),
301 250 ),
302 251 );
303 252
@@ -303,11 +252,8 @@
303 252
304 253 return $tips;
305 254 }
306 255
307 - /**
308 - * @return array
309 - */
310 256 public static function get_entries_tip() {
311 257 $tips = array(
312 258 array(
313 259 'link' => array(
@@ -338,11 +284,8 @@
338 284
339 285 return $tips;
340 286 }
341 287
342 - /**
343 - * @return array
344 - */
345 288 public static function get_import_tip() {
346 289 $tips = array(
347 290 array(
348 291 'link' => array(
@@ -356,11 +299,8 @@
356 299
357 300 return $tips;
358 301 }
359 302
360 - /**
361 - * @return array
362 - */
363 303 public static function get_banner_tip() {
364 304 $tips = array(
365 305 array(
366 306 'link' => array(
@@ -383,9 +323,9 @@
383 323 'medium' => 'banner',
384 324 'content' => 'automate',
385 325 ),
386 326 'tip' => __( 'Automate your business and increase revenue.', 'formidable' ),
387 - 'call' => __( 'Collect instant payments, and send leads to Mailchimp.', 'formidable' ),
327 + 'call' => __( 'Collect instant payments, and send leads to MailChimp.', 'formidable' ),
388 328 ),
389 329 );
390 330 $random = rand( 0, count( $tips ) - 1 );
391 331 $tip = $tips[ $random ];