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/views/addons/settings.php +22 -10 6.4.2 → trunk View file →
@@ -1,5 +1,13 @@
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 +
2 10 if ( ! defined( 'ABSPATH' ) ) {
3 11 die( 'You are not allowed to call this page directly.' );
4 12 }
5 13 ?>
@@ -6,32 +14,36 @@
6 14 <div class="wrap">
7 15 <?php
8 16
9 17 foreach ( $plugins as $slug => $plugin ) {
10 - if ( $slug == 'formidable_pro' || $plugin->is_parent_licence || ! $plugin->needs_license ) {
18 + if ( $slug === 'formidable_pro' || $plugin->is_parent_licence || ! $plugin->needs_license ) {
11 19 continue;
12 20 }
13 21
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' : '';
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';
18 26 ?>
19 27
20 28 <div class="edd_frm_license_row frm-inline-select frm_grid_container">
21 29 <label class="frm4 frm_form_field" for="edd_<?php echo esc_attr( $slug ); ?>_license_key"><?php echo esc_html( $plugin->plugin_name ); ?></label>
22 - <div class="edd_frm_authorized frm8 frm_form_field <?php echo esc_attr( $activate == 'activate' ) ? 'frm_hidden' : ''; ?>">
30 + <div class="edd_frm_authorized frm8 frm_form_field <?php echo esc_attr( $activate === 'activate' ) ? 'frm_hidden' : ''; ?>">
23 31 <span class="edd_frm_license"><?php esc_html_e( 'Good to go!', 'formidable' ); ?></span>
24 - <span class="frm_icon_font frm_action_icon frm_error_icon edd_frm_status_icon frm_inactive_icon"></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>
25 34 <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' ); ?>"/>
26 35 <p class="frm_license_msg"></p>
27 36 </div>
28 - <div class="edd_frm_unauthorized frm8 frm_form_field <?php echo esc_attr( $activate == 'deactivate' ) ? 'frm_hidden' : ''; ?>">
37 + <div class="edd_frm_unauthorized frm8 frm_form_field <?php echo esc_attr( $activate === 'deactivate' ) ? 'frm_hidden' : ''; ?>">
29 38 <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="" />
30 - <span class="frm_icon_font frm_action_icon frm_error_icon edd_frm_status_icon <?php echo esc_attr( $icon_class ); ?>"></span>
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>
31 41 <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' ); ?>"/>
32 42 <p class="frm_license_msg"></p>
33 43 </div>
34 44
35 45 </div>
36 - <?php } ?>
46 + <?php
47 + }//end foreach
48 + ?>
37 49 </div>