PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.5.7
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.5.7
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 +6 -53 6.4.1 → 5.5.7 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,44 +12,22 @@
18 12
19 13 $tips = self::$callback();
20 14 $tip = self::get_random_tip( $tips );
21 15
22 - self::show_tip( $tip );
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 20 if ( ! isset( $tip['page'] ) ) {
45 21 $tip['page'] = '';
46 22 }
47 - if ( isset( $tip['link'] ) && ! isset( $tip['link']['medium'] ) ) {
23 + if ( ! isset( $tip['link']['medium'] ) ) {
48 24 $tip['link']['medium'] = 'tip';
49 25 }
50 26
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'] );
27 + $link = FrmAppHelper::admin_upgrade_link( $tip['link'], $tip['page'] );
56 28 ?>
57 - <a href="<?php echo esc_url( $link ); ?>" <?php echo empty( $tip['link'] ) ? '' : 'target="_blank"'; ?> class="frm_pro_tip">
29 + <a href="<?php echo esc_url( $link ); ?>" target="_blank" class="frm_pro_tip">
58 30 <?php FrmAppHelper::icon_by_class( 'frmfont frm_lightning', array( 'aria-hidden' => 'true' ) ); ?>
59 31
60 32 <?php if ( isset( $tip['call'] ) ) { ?>
61 33 <span class="frm-tip-info">
@@ -70,17 +42,13 @@
70 42 </span>
71 43 <?php } ?>
72 44 </a>
73 45 <?php
74 -
75 46 if ( 'p' === $html ) {
76 47 echo '</p>';
77 48 }
78 49 }
79 50
80 - /**
81 - * @return array
82 - */
83 51 public static function get_builder_tip() {
84 52 $tips = array(
85 53 array(
86 54 'link' => array(
@@ -134,11 +102,8 @@
134 102
135 103 return $tips;
136 104 }
137 105
138 - /**
139 - * @return array
140 - */
141 106 public static function get_form_settings_tip() {
142 107 $tips = array(
143 108 array(
144 109 'link' => array(
@@ -168,11 +133,8 @@
168 133
169 134 return $tips;
170 135 }
171 136
172 - /**
173 - * @return array
174 - */
175 137 public static function get_form_action_tip() {
176 138 $tips = array(
177 139 array(
178 140 'link' => array(
@@ -300,11 +262,8 @@
300 262
301 263 return $tips;
302 264 }
303 265
304 - /**
305 - * @return array
306 - */
307 266 public static function get_entries_tip() {
308 267 $tips = array(
309 268 array(
310 269 'link' => array(
@@ -335,11 +294,8 @@
335 294
336 295 return $tips;
337 296 }
338 297
339 - /**
340 - * @return array
341 - */
342 298 public static function get_import_tip() {
343 299 $tips = array(
344 300 array(
345 301 'link' => array(
@@ -353,11 +309,8 @@
353 309
354 310 return $tips;
355 311 }
356 312
357 - /**
358 - * @return array
359 - */
360 313 public static function get_banner_tip() {
361 314 $tips = array(
362 315 array(
363 316 'link' => array(