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 +13 -74 6.55.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,47 +12,22 @@
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">
29 + <a href="<?php echo esc_url( $link ); ?>" target="_blank" class="frm_pro_tip">
61 30 <?php FrmAppHelper::icon_by_class( 'frmfont frm_lightning', array( 'aria-hidden' => 'true' ) ); ?>
62 31
63 32 <?php if ( isset( $tip['call'] ) ) { ?>
64 33 <span class="frm-tip-info">
@@ -73,17 +42,13 @@
73 42 </span>
74 43 <?php } ?>
75 44 </a>
76 45 <?php
77 -
78 46 if ( 'p' === $html ) {
79 47 echo '</p>';
80 48 }
81 49 }
82 50
83 - /**
84 - * @return array
85 - */
86 51 public static function get_builder_tip() {
87 52 $tips = array(
88 53 array(
89 54 'link' => array(
@@ -137,11 +102,8 @@
137 102
138 103 return $tips;
139 104 }
140 105
141 - /**
142 - * @return array
143 - */
144 106 public static function get_form_settings_tip() {
145 107 $tips = array(
146 108 array(
147 109 'link' => array(
@@ -171,11 +133,8 @@
171 133
172 134 return $tips;
173 135 }
174 136
175 - /**
176 - * @return array
177 - */
178 137 public static function get_form_action_tip() {
179 138 $tips = array(
180 139 array(
181 140 'link' => array(
@@ -206,9 +165,9 @@
206 165 'content' => 'mailchimp',
207 166 'page' => 'mailchimp-tip',
208 167 ),
209 168 'tip' => __( 'Grow your business with automated email follow-up.', 'formidable' ),
210 - 'call' => __( 'Send leads straight to Mailchimp.', 'formidable' ),
169 + 'call' => __( 'Send leads straight to MailChimp.', 'formidable' ),
211 170 ),
212 171 array(
213 172 'link' => array(
214 173 'content' => 'paypal-revenue',
@@ -256,24 +215,13 @@
256 215 ),
257 216 'tip' => __( 'Send an SMS message when a form is submitted.', 'formidable' ),
258 217 'call' => __( 'Get the Twilio integration.', 'formidable' ),
259 218 ),
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 219 );
269 220
270 221 return $tips;
271 222 }
272 223
273 - /**
274 - * @return array
275 - */
276 224 public static function get_styling_tip() {
277 225 $tips = array(
278 226 array(
279 227 'link' => array(
@@ -293,11 +241,11 @@
293 241 ),
294 242 array(
295 243 'link' => array(
296 244 'content' => 'style',
297 - 'param' => 'duplicate-style',
245 + 'param' => 'bg-image-style-settings',
298 246 ),
299 - 'tip' => __( 'Want to duplicate a style?', 'formidable' ),
247 + 'tip' => __( 'Want to set a color with an alpha slider?', 'formidable' ),
300 248 'call' => __( 'Upgrade to Pro.', 'formidable' ),
301 249 ),
302 250 );
303 251
@@ -303,11 +251,8 @@
303 251
304 252 return $tips;
305 253 }
306 254
307 - /**
308 - * @return array
309 - */
310 255 public static function get_entries_tip() {
311 256 $tips = array(
312 257 array(
313 258 'link' => array(
@@ -338,11 +283,8 @@
338 283
339 284 return $tips;
340 285 }
341 286
342 - /**
343 - * @return array
344 - */
345 287 public static function get_import_tip() {
346 288 $tips = array(
347 289 array(
348 290 'link' => array(
@@ -356,11 +298,8 @@
356 298
357 299 return $tips;
358 300 }
359 301
360 - /**
361 - * @return array
362 - */
363 302 public static function get_banner_tip() {
364 303 $tips = array(
365 304 array(
366 305 'link' => array(
@@ -383,9 +322,9 @@
383 322 'medium' => 'banner',
384 323 'content' => 'automate',
385 324 ),
386 325 'tip' => __( 'Automate your business and increase revenue.', 'formidable' ),
387 - 'call' => __( 'Collect instant payments, and send leads to Mailchimp.', 'formidable' ),
326 + 'call' => __( 'Collect instant payments, and send leads to MailChimp.', 'formidable' ),
388 327 ),
389 328 );
390 329 $random = rand( 0, count( $tips ) - 1 );
391 330 $tip = $tips[ $random ];