PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
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 +14 -45 6.26 → trunk View file →
@@ -47,10 +47,10 @@
47 47 'class' => 'frm-mt-0',
48 48 );
49 49 $tip = array_merge( $defaults, $tip );
50 50
51 - if ( isset( $tip['link'] ) && ! isset( $tip['link']['medium'] ) ) {
52 - $tip['link']['medium'] = 'tip';
51 + if ( isset( $tip['link'] ) && ! isset( $tip['link']['medium'] ) && ! isset( $tip['link']['campaign'] ) ) {
52 + $tip['link']['campaign'] = 'tip';
53 53 }
54 54
55 55 if ( 'p' === $html ) {
56 56 echo '<p class="frmcenter ' . esc_attr( $tip['class'] ) . '">';
@@ -56,10 +56,11 @@
56 56 echo '<p class="frmcenter ' . esc_attr( $tip['class'] ) . '">';
57 57 }
58 58
59 59 $link = self::get_tip_link( $tip );
60 + // phpcs:disable Generic.WhiteSpace.ScopeIndent
60 61 ?>
61 - <a href="<?php echo esc_url( $link ); ?>" <?php echo empty( $tip['link'] ) ? '' : 'target="_blank"'; ?> class="frm_pro_tip frm-gradient">
62 + <a href="<?php echo esc_url( $link ); ?>" <?php echo ! empty( $tip['link'] ) ? 'target="_blank"' : ''; ?> class="frm_pro_tip frm-gradient">
62 63 <span class="frm-tip-badge"><?php esc_html_e( 'PRO TIP', 'formidable' ); ?></span>
63 64
64 65 <?php if ( isset( $tip['call'] ) ) { ?>
65 66 <span class="frm-tip-info">
@@ -70,8 +71,9 @@
70 71 <?php echo esc_html( $tip['call'] ? $tip['call'] : $tip['tip'] ); ?>
71 72 </span>
72 73 </a>
73 74 <?php
75 + // phpcs:enable Generic.WhiteSpace.ScopeIndent
74 76
75 77 if ( 'p' === $html ) {
76 78 echo '</p>';
77 79 }
@@ -92,10 +94,11 @@
92 94 $cta_link = FrmSalesApi::get_best_sale_value( 'pro_tip_cta_link' );
93 95
94 96 if ( $cta_link ) {
95 97 if ( is_array( $tip['link'] ) ) {
96 - $cta_link = FrmAppHelper::maybe_add_missing_utm( $cta_link, $tip['link'] );
98 + return FrmAppHelper::maybe_add_missing_utm( $cta_link, $tip['link'] );
97 99 }
100 +
98 101 return $cta_link;
99 102 }
100 103
101 104 return FrmAppHelper::admin_upgrade_link( $tip['link'], $tip['page'] );
@@ -113,8 +116,9 @@
113 116
114 117 if ( $cta_text ) {
115 118 return $cta_text;
116 119 }
120 +
117 121 return FrmAddonsController::is_license_expired() ? __( 'Renew', 'formidable' ) : __( 'Upgrade to Pro.', 'formidable' );
118 122 }
119 123
120 124 /**
@@ -120,9 +124,9 @@
120 124 /**
121 125 * @return array
122 126 */
123 127 public static function get_builder_tip() {
124 - $tips = array(
128 + return array(
125 129 array(
126 130 'link' => array(
127 131 'content' => 'conditional-logic',
128 132 'param' => 'conditional-logic-wordpress-forms',
@@ -155,16 +159,8 @@
155 159 'call' => self::cta_label(),
156 160 ),
157 161 array(
158 162 'link' => array(
159 - 'content' => 'calculations',
160 - 'param' => 'field-calculations-wordpress-form',
161 - ),
162 - 'tip' => __( 'Need to calculate a total?', 'formidable' ),
163 - 'call' => self::cta_label(),
164 - ),
165 - array(
166 - 'link' => array(
167 163 'content' => 'prefill-fields',
168 164 'param' => 'auto-fill-forms',
169 165 ),
170 166 'tip' => __( 'Save time with autofill forms.', 'formidable' ),
@@ -170,10 +166,8 @@
170 166 'tip' => __( 'Save time with autofill forms.', 'formidable' ),
171 167 'call' => self::cta_label(),
172 168 ),
173 169 );
174 -
175 - return $tips;
176 170 }
177 171
178 172 /**
179 173 * @return array
@@ -178,9 +172,9 @@
178 172 /**
179 173 * @return array
180 174 */
181 175 public static function get_form_settings_tip() {
182 - $tips = array(
176 + return array(
183 177 array(
184 178 'link' => array(
185 179 'content' => 'front-edit-b',
186 180 'param' => 'wordpress-front-end-editing',
@@ -204,10 +198,8 @@
204 198 'tip' => __( 'Limit form access with built-in scheduling.', 'formidable' ),
205 199 'call' => self::cta_label(),
206 200 ),
207 201 );
208 -
209 - return $tips;
210 202 }
211 203
212 204 /**
213 205 * @return array
@@ -212,9 +204,9 @@
212 204 /**
213 205 * @return array
214 206 */
215 207 public static function get_form_action_tip() {
216 - $tips = array(
208 + return array(
217 209 array(
218 210 'link' => array(
219 211 'content' => 'email-routing',
220 212 'param' => 'virtually-unlimited-emails',
@@ -247,24 +239,8 @@
247 239 'call' => self::cta_label(),
248 240 ),
249 241 array(
250 242 'link' => array(
251 - 'content' => 'paypal-revenue',
252 - 'page' => 'paypal-increase-revenue-tip',
253 - ),
254 - 'tip' => __( 'Accept PayPal payments and grow your sales.', 'formidable' ),
255 - 'call' => self::cta_label(),
256 - ),
257 - array(
258 - 'link' => array(
259 - 'content' => 'paypal-fast',
260 - 'page' => 'paypal-save-time-tip',
261 - ),
262 - 'tip' => __( 'Accept payments now with PayPal integration.', 'formidable' ),
263 - 'call' => self::cta_label(),
264 - ),
265 - array(
266 - 'link' => array(
267 243 'content' => 'registration',
268 244 'page' => 'registration-tip',
269 245 ),
270 246 'tip' => __( 'Automatically create user accounts.', 'formidable' ),
@@ -302,10 +278,8 @@
302 278 'tip' => __( 'Fill Advanced Custom Fields automatically with form entries.', 'formidable' ),
303 279 'call' => self::cta_label(),
304 280 ),
305 281 );
306 -
307 - return $tips;
308 282 }
309 283
310 284 /**
311 285 * @return array
@@ -310,9 +284,9 @@
310 284 /**
311 285 * @return array
312 286 */
313 287 public static function get_styling_tip() {
314 - $tips = array(
288 + return array(
315 289 array(
316 290 'link' => array(
317 291 'content' => 'style',
318 292 'param' => 'wordpress-visual-form-styler',
@@ -336,10 +310,8 @@
336 310 'tip' => __( 'Want to duplicate a style?', 'formidable' ),
337 311 'call' => self::cta_label(),
338 312 ),
339 313 );
340 -
341 - return $tips;
342 314 }
343 315
344 316 /**
345 317 * @return array
@@ -370,11 +342,10 @@
370 342 'tip' => __( 'Turn entries into dynamic content — no code needed.', 'formidable' ),
371 343 'call' => self::cta_label(),
372 344 ),
373 345 );
374 - $tips = array_merge( $tips, self::get_import_tip() );
375 346
376 - return $tips;
347 + return array_merge( $tips, self::get_import_tip() );
377 348 }
378 349
379 350 /**
380 351 * @return array
@@ -379,9 +350,9 @@
379 350 /**
380 351 * @return array
381 352 */
382 353 public static function get_import_tip() {
383 - $tips = array(
354 + return array(
384 355 array(
385 356 'link' => array(
386 357 'content' => 'import',
387 358 'param' => 'importing-exporting-wordpress-forms',
@@ -389,10 +360,8 @@
389 360 'tip' => __( 'Want to import entries into your forms?', 'formidable' ),
390 361 'call' => self::cta_label(),
391 362 ),
392 363 );
393 -
394 - return $tips;
395 364 }
396 365
397 366 /**
398 367 * @param array $tips