PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.4
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.4
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 +10 -68 6.35.4 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(
@@ -203,9 +165,9 @@
203 165 'content' => 'mailchimp',
204 166 'page' => 'mailchimp-tip',
205 167 ),
206 168 'tip' => __( 'Grow your business with automated email follow-up.', 'formidable' ),
207 - 'call' => __( 'Send leads straight to Mailchimp.', 'formidable' ),
169 + 'call' => __( 'Send leads straight to MailChimp.', 'formidable' ),
208 170 ),
209 171 array(
210 172 'link' => array(
211 173 'content' => 'paypal-revenue',
@@ -253,24 +215,13 @@
253 215 ),
254 216 'tip' => __( 'Send an SMS message when a form is submitted.', 'formidable' ),
255 217 'call' => __( 'Get the Twilio integration.', 'formidable' ),
256 218 ),
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 219 );
266 220
267 221 return $tips;
268 222 }
269 223
270 - /**
271 - * @return array
272 - */
273 224 public static function get_styling_tip() {
274 225 $tips = array(
275 226 array(
276 227 'link' => array(
@@ -290,11 +241,11 @@
290 241 ),
291 242 array(
292 243 'link' => array(
293 244 'content' => 'style',
294 - 'param' => 'duplicate-style',
245 + 'param' => 'bg-image-style-settings',
295 246 ),
296 - 'tip' => __( 'Want to duplicate a style?', 'formidable' ),
247 + 'tip' => __( 'Want to set a color with an alpha slider?', 'formidable' ),
297 248 'call' => __( 'Upgrade to Pro.', 'formidable' ),
298 249 ),
299 250 );
300 251
@@ -300,11 +251,8 @@
300 251
301 252 return $tips;
302 253 }
303 254
304 - /**
305 - * @return array
306 - */
307 255 public static function get_entries_tip() {
308 256 $tips = array(
309 257 array(
310 258 'link' => array(
@@ -335,11 +283,8 @@
335 283
336 284 return $tips;
337 285 }
338 286
339 - /**
340 - * @return array
341 - */
342 287 public static function get_import_tip() {
343 288 $tips = array(
344 289 array(
345 290 'link' => array(
@@ -353,11 +298,8 @@
353 298
354 299 return $tips;
355 300 }
356 301
357 - /**
358 - * @return array
359 - */
360 302 public static function get_banner_tip() {
361 303 $tips = array(
362 304 array(
363 305 'link' => array(
@@ -380,9 +322,9 @@
380 322 'medium' => 'banner',
381 323 'content' => 'automate',
382 324 ),
383 325 'tip' => __( 'Automate your business and increase revenue.', 'formidable' ),
384 - 'call' => __( 'Collect instant payments, and send leads to Mailchimp.', 'formidable' ),
326 + 'call' => __( 'Collect instant payments, and send leads to MailChimp.', 'formidable' ),
385 327 ),
386 328 );
387 329 $random = rand( 0, count( $tips ) - 1 );
388 330 $tip = $tips[ $random ];