PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.16
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.16
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/FrmAddonsHelper.php +1 -76 6.346.16 View file →
@@ -25,9 +25,8 @@
25 25 /**
26 26 * Show the CTA to upgrade or renew.
27 27 *
28 28 * @since 6.15
29 - *
30 29 * @return void
31 30 */
32 31 public static function show_upgrade_renew_cta() {
33 32 if ( FrmAddonsController::is_license_expired() ) {
@@ -48,16 +47,13 @@
48 47 /**
49 48 * Show 'Renew' banner for expired users.
50 49 *
51 50 * @since 6.15
52 - *
53 51 * @return void
54 52 */
55 53 private static function show_expired_cta() {
56 54 FrmTipsHelper::show_admin_cta(
57 55 array(
58 - 'class' => 'frm-gradient',
59 - 'icon' => 'frmfont frm_speaker_icon',
60 56 'title' => esc_html__( 'Unlock Add-on library', 'formidable' ),
61 57 'description' => esc_html__( 'Renew your subscription today and access our library of add-ons to supercharge your forms.', 'formidable' ),
62 58 'link_text' => esc_html__( 'Renew Now', 'formidable' ),
63 59 'link_url' => FrmAddonsController::is_license_expired(),
@@ -69,16 +65,13 @@
69 65 /**
70 66 * Show 'Upgrade to Pro' banner for users not connected to Pro.
71 67 *
72 68 * @since 6.15
73 - *
74 69 * @return void
75 70 */
76 71 private static function show_lite_cta() {
77 72 FrmTipsHelper::show_admin_cta(
78 73 array(
79 - 'class' => 'frm-gradient',
80 - 'icon' => 'frmfont frm_speaker_icon',
81 74 'title' => esc_html__( 'Unlock Add-on library', 'formidable' ),
82 75 'description' => esc_html__( 'Upgrade to Pro and access our library of add-ons to supercharge your forms.', 'formidable' ),
83 76 'link_text' => esc_html__( 'Upgrade to PRO', 'formidable' ),
84 77 'link_url' => FrmAppHelper::admin_upgrade_link(
@@ -95,9 +88,8 @@
95 88 /**
96 89 * Show 'Upgrade' banner for non-elite users.
97 90 *
98 91 * @since 6.15
99 - *
100 92 * @return void
101 93 */
102 94 private static function show_elite_cta() {
103 95 FrmTipsHelper::show_admin_cta(
@@ -124,9 +116,8 @@
124 116 /**
125 117 * Displays a reconnect link for checking add-ons status.
126 118 *
127 119 * @since 6.15
128 - *
129 120 * @return void
130 121 */
131 122 public static function get_reconnect_link() {
132 123 if ( ! FrmAppHelper::pro_is_connected() ) {
@@ -131,9 +122,8 @@
131 122 public static function get_reconnect_link() {
132 123 if ( ! FrmAppHelper::pro_is_connected() ) {
133 124 return;
134 125 }
135 - // phpcs:disable Generic.WhiteSpace.ScopeIndent
136 126 ?>
137 127 <p class="frm-py-2xs">
138 128 <span class="frm-font-medium frm-text-grey-700"><?php esc_html_e( 'Missing add-ons?', 'formidable' ); ?></span>
139 129 <a href="#" id="frm_reconnect_link" class="frm-show-authorized frm-font-semibold" data-refresh="1">
@@ -140,9 +130,8 @@
140 130 <?php esc_html_e( 'Check now for a recent upgrade or renewal', 'formidable' ); ?>
141 131 </a>
142 132 </p>
143 133 <?php
144 - // phpcs:enable Generic.WhiteSpace.ScopeIndent
145 134 }
146 135
147 136 /**
148 137 * Get the icon for a specific addon.
@@ -147,11 +136,9 @@
147 136 /**
148 137 * Get the icon for a specific addon.
149 138 *
150 139 * @since 6.15
151 - *
152 140 * @param string $slug The slug of the addon.
153 - *
154 141 * @return void
155 142 */
156 143 public static function get_addon_icon( $slug ) {
157 144 $icons_map = array(
@@ -177,13 +164,11 @@
177 164 'twilio' => 'twilio',
178 165 'woocommerce' => 'woocommerce',
179 166 'zapier' => 'zapier',
180 167 'convertkit' => 'convertkit',
181 - 'n8n' => 'n8n',
182 168 );
183 169
184 170 $icon = array_key_exists( $slug, $icons_map ) ? 'frm_' . $icons_map[ $slug ] . '_icon' : 'frm_logo_icon';
185 -
186 171 if ( 'ai' === $slug ) {
187 172 $icon = str_replace( '_', '-', $icon );
188 173 }
189 174
@@ -195,9 +180,8 @@
195 180 *
196 181 * @since 6.15
197 182 *
198 183 * @param array $addon
199 - *
200 184 * @return void
201 185 */
202 186 public static function add_addon_attributes( $addon ) {
203 187 self::set_plan_required( $addon );
@@ -227,13 +211,12 @@
227 211 *
228 212 * @since 6.15
229 213 *
230 214 * @param array $addon
231 - *
232 215 * @return string
233 216 */
234 217 private static function prepare_single_addon_classes( $addon ) {
235 - $class_names = array( 'frm-card-item frm-card-item--outlined frm-flex-col' );
218 + $class_names = array( 'frm-card-item frm-flex-col' );
236 219 $class_names[] = 'plugin-card-' . $addon['slug'];
237 220 $class_names[] = 'frm-addon-' . $addon['status']['type'];
238 221
239 222 if ( self::is_locked() ) {
@@ -261,9 +244,8 @@
261 244 *
262 245 * @since 6.15
263 246 *
264 247 * @param array $addon The addon array that will be modified by reference.
265 - *
266 248 * @return void
267 249 */
268 250 private static function set_plan_required( $addon ) {
269 251 self::$plan_required = FrmFormsHelper::get_plan_required( $addon );
@@ -277,63 +259,6 @@
277 259 * @return false|string
278 260 */
279 261 public static function get_plan() {
280 262 return self::$plan_required;
281 - }
282 -
283 - /**
284 - * Shows five star rating, used on Views page if only Lite plugins are installed.
285 - *
286 - * @since 6.17
287 - *
288 - * @param string $color Star color.
289 - *
290 - * @return void
291 - */
292 - public static function show_five_star_rating( $color = 'black' ) {
293 - // phpcs:disable Generic.WhiteSpace.ScopeIndent
294 - ?>
295 - <span style="color: <?php echo esc_attr( $color ); ?>;">
296 - <?php
297 - for ( $i = 0; $i < 5; $i++ ) {
298 - readfile( FrmAppHelper::plugin_path() . '/images/star.svg' );
299 - }
300 - ?>
301 - </span>
302 - <?php
303 - // phpcs:enable Generic.WhiteSpace.ScopeIndent
304 - }
305 -
306 - /**
307 - * Shows the guarantee icon.
308 - *
309 - * @since 6.17
310 - *
311 - * @return void
312 - */
313 - public static function guarantee_icon() {
314 - // phpcs:disable Generic.WhiteSpace.ScopeIndent
315 - ?>
316 - <img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/guarantee.svg' ); ?>" alt="" />
317 - <?php
318 - // phpcs:enable Generic.WhiteSpace.ScopeIndent
319 - }
320 -
321 - /**
322 - * Gets reviews text.
323 - *
324 - * @since 6.17
325 - *
326 - * @param string $count Review count.
327 - * @param string $site Site name.
328 - *
329 - * @return string
330 - */
331 - public static function get_reviews_text( $count, $site ) {
332 - return sprintf(
333 - // Translators: %1$s is the number of reviews, %2$s is the site name.
334 - __( 'Based on %1$s reviews on %2$s', 'formidable' ),
335 - $count,
336 - $site
337 - );
338 263 }
339 264 }