PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.1
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 +15 -72 6.35.1 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,50 +12,29 @@
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">
58 - <?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>
59 34
60 35 <?php if ( isset( $tip['call'] ) ) { ?>
61 - <span class="frm-tip-info">
62 - <?php echo esc_html( $tip['tip'] ); ?>
63 - </span>
36 + <?php echo esc_html( $tip['tip'] ); ?>
64 37 <span class="frm-tip-cta">
65 38 <?php echo esc_html( $tip['call'] ); ?>
66 39 </span>
67 40 <?php } else { ?>
@@ -70,17 +43,13 @@
70 43 </span>
71 44 <?php } ?>
72 45 </a>
73 46 <?php
74 -
75 47 if ( 'p' === $html ) {
76 48 echo '</p>';
77 49 }
78 50 }
79 51
80 - /**
81 - * @return array
82 - */
83 52 public static function get_builder_tip() {
84 53 $tips = array(
85 54 array(
86 55 'link' => array(
@@ -134,11 +103,8 @@
134 103
135 104 return $tips;
136 105 }
137 106
138 - /**
139 - * @return array
140 - */
141 107 public static function get_form_settings_tip() {
142 108 $tips = array(
143 109 array(
144 110 'link' => array(
@@ -168,11 +134,8 @@
168 134
169 135 return $tips;
170 136 }
171 137
172 - /**
173 - * @return array
174 - */
175 138 public static function get_form_action_tip() {
176 139 $tips = array(
177 140 array(
178 141 'link' => array(
@@ -203,9 +166,9 @@
203 166 'content' => 'mailchimp',
204 167 'page' => 'mailchimp-tip',
205 168 ),
206 169 'tip' => __( 'Grow your business with automated email follow-up.', 'formidable' ),
207 - 'call' => __( 'Send leads straight to Mailchimp.', 'formidable' ),
170 + 'call' => __( 'Send leads straight to MailChimp.', 'formidable' ),
208 171 ),
209 172 array(
210 173 'link' => array(
211 174 'content' => 'paypal-revenue',
@@ -253,24 +216,13 @@
253 216 ),
254 217 'tip' => __( 'Send an SMS message when a form is submitted.', 'formidable' ),
255 218 'call' => __( 'Get the Twilio integration.', 'formidable' ),
256 219 ),
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 220 );
266 221
267 222 return $tips;
268 223 }
269 224
270 - /**
271 - * @return array
272 - */
273 225 public static function get_styling_tip() {
274 226 $tips = array(
275 227 array(
276 228 'link' => array(
@@ -290,11 +242,11 @@
290 242 ),
291 243 array(
292 244 'link' => array(
293 245 'content' => 'style',
294 - 'param' => 'duplicate-style',
246 + 'param' => 'bg-image-style-settings',
295 247 ),
296 - 'tip' => __( 'Want to duplicate a style?', 'formidable' ),
248 + 'tip' => __( 'Want to set a color with an alpha slider?', 'formidable' ),
297 249 'call' => __( 'Upgrade to Pro.', 'formidable' ),
298 250 ),
299 251 );
300 252
@@ -300,11 +252,8 @@
300 252
301 253 return $tips;
302 254 }
303 255
304 - /**
305 - * @return array
306 - */
307 256 public static function get_entries_tip() {
308 257 $tips = array(
309 258 array(
310 259 'link' => array(
@@ -335,11 +284,8 @@
335 284
336 285 return $tips;
337 286 }
338 287
339 - /**
340 - * @return array
341 - */
342 288 public static function get_import_tip() {
343 289 $tips = array(
344 290 array(
345 291 'link' => array(
@@ -353,11 +299,8 @@
353 299
354 300 return $tips;
355 301 }
356 302
357 - /**
358 - * @return array
359 - */
360 303 public static function get_banner_tip() {
361 304 $tips = array(
362 305 array(
363 306 'link' => array(
@@ -380,9 +323,9 @@
380 323 'medium' => 'banner',
381 324 'content' => 'automate',
382 325 ),
383 326 'tip' => __( 'Automate your business and increase revenue.', 'formidable' ),
384 - 'call' => __( 'Collect instant payments, and send leads to Mailchimp.', 'formidable' ),
327 + 'call' => __( 'Collect instant payments, and send leads to MailChimp.', 'formidable' ),
385 328 ),
386 329 );
387 330 $random = rand( 0, count( $tips ) - 1 );
388 331 $tip = $tips[ $random ];