PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.0
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.0
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/views/addons/settings.php +11 -23 6.345.0 View file →
@@ -1,13 +1,5 @@
1 1 <?php
2 -/**
3 - * Add-Ons license settings.
4 - *
5 - * @package Formidable
6 - *
7 - * @var array<string, object> $plugins Installed add-on plugin objects keyed by slug. Each has: is_parent_licence, needs_license, license, option_name, plugin_name.
8 - */
9 -
10 2 if ( ! defined( 'ABSPATH' ) ) {
11 3 die( 'You are not allowed to call this page directly.' );
12 4 }
13 5 ?>
@@ -14,36 +6,32 @@
14 6 <div class="wrap">
15 7 <?php
16 8
17 9 foreach ( $plugins as $slug => $plugin ) {
18 - if ( $slug === 'formidable_pro' || $plugin->is_parent_licence || ! $plugin->needs_license ) {
10 + if ( $slug == 'formidable_pro' || $plugin->is_parent_licence || ! $plugin->needs_license ) {
19 11 continue;
20 12 }
21 13
22 - $license = $plugin->license;
23 - $status = get_option( $plugin->option_name . 'active' );
24 - $activate = false !== $license && $status === 'valid' ? 'deactivate' : 'activate';
25 - $icon_class = $license ? '' : 'frm_hidden';
14 + $license = $plugin->license;
15 + $status = get_option( $plugin->option_name . 'active' );
16 + $activate = ( false !== $license && $status == 'valid' ) ? 'deactivate' : 'activate';
17 + $icon_class = ( empty( $license ) ) ? 'frm_hidden' : '';
26 18 ?>
27 19
28 - <div class="edd_frm_license_row frm-inline-select frm_grid_container">
20 + <div class="edd_frm_license_row frm_grid_container">
29 21 <label class="frm4 frm_form_field" for="edd_<?php echo esc_attr( $slug ); ?>_license_key"><?php echo esc_html( $plugin->plugin_name ); ?></label>
30 - <div class="edd_frm_authorized frm8 frm_form_field <?php echo esc_attr( $activate === 'activate' ) ? 'frm_hidden' : ''; ?>">
22 + <div class="edd_frm_authorized frm8 frm_form_field <?php echo esc_attr( $activate == 'activate' ) ? 'frm_hidden' : ''; ?>">
31 23 <span class="edd_frm_license"><?php esc_html_e( 'Good to go!', 'formidable' ); ?></span>
32 - <span class="frm_icon_font frm_action_success"><?php FrmAppHelper::icon_by_class( 'frmfont frm_check1_icon frm_action_icon edd_frm_status_icon frm_inactive_icon' ); ?></span>
33 - <span class="frm_icon_font frm_action_error frm_hidden"><?php FrmAppHelper::icon_by_class( 'frmfont frm_cancel1_icon edd_frm_status_icon' ); ?></span>
24 + <span class="frm_icon_font frm_action_icon frm_error_icon edd_frm_status_icon frm_inactive_icon"></span>
34 25 <input type="button" class="button-secondary frm-button-secondary edd_frm_save_license" data-plugin="<?php echo esc_attr( $slug ); ?>" name="edd_<?php echo esc_attr( $slug ); ?>_license_deactivate" value="<?php esc_attr_e( 'Deactivate', 'formidable' ); ?>"/>
35 26 <p class="frm_license_msg"></p>
36 27 </div>
37 - <div class="edd_frm_unauthorized frm8 frm_form_field <?php echo esc_attr( $activate === 'deactivate' ) ? 'frm_hidden' : ''; ?>">
28 + <div class="edd_frm_unauthorized frm8 frm_form_field <?php echo esc_attr( $activate == 'deactivate' ) ? 'frm_hidden' : ''; ?>">
38 29 <input id="edd_<?php echo esc_attr( $slug ); ?>_license_key" name="edd_<?php echo esc_attr( $slug ); ?>_license_key" type="text" class="frm_addon_license_key auto_width" value="" />
39 - <span class="frm_icon_font frm_action_success <?php echo esc_attr( $icon_class ); ?>"><?php FrmAppHelper::icon_by_class( 'frmfont frm_check1_icon edd_frm_status_icon' ); ?></span>
40 - <span class="frm_icon_font frm_action_error frm_hidden"><?php FrmAppHelper::icon_by_class( 'frmfont frm_cancel1_icon edd_frm_status_icon' ); ?></span>
30 + <span class="frm_icon_font frm_action_icon frm_error_icon edd_frm_status_icon <?php echo esc_attr( $icon_class ); ?>"></span>
41 31 <input type="button" class="button-secondary frm-button-secondary edd_frm_save_license" data-plugin="<?php echo esc_attr( $slug ); ?>" name="edd_<?php echo esc_attr( $slug ); ?>_license_activate" value="<?php esc_attr_e( 'Activate', 'formidable' ); ?>"/>
42 32 <p class="frm_license_msg"></p>
43 33 </div>
44 34
45 35 </div>
46 - <?php
47 - }//end foreach
48 - ?>
36 + <?php } ?>
49 37 </div>