| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
die( 'You are not allowed to call this page directly.' ); |
| 4 |
} |
| 5 |
?> |
| 6 |
<div class="wrap"> |
| 7 |
<?php |
| 8 |
|
| 9 |
foreach ( $plugins as $slug => $plugin ) { |
| 10 |
if ( $slug == 'formidable_pro' || $plugin->is_parent_licence || ! $plugin->needs_license ) { |
| 11 |
continue; |
| 12 |
} |
| 13 |
|
| 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' : ''; |
| 18 |
?> |
| 19 |
|
| 20 |
<div class="edd_frm_license_row frm-inline-select frm_grid_container"> |
| 21 |
<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' : ''; ?>"> |
| 23 |
<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> |
| 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' ); ?>"/> |
| 26 |
<p class="frm_license_msg"></p> |
| 27 |
</div> |
| 28 |
<div class="edd_frm_unauthorized frm8 frm_form_field <?php echo esc_attr( $activate == 'deactivate' ) ? 'frm_hidden' : ''; ?>"> |
| 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="" /> |
| 30 |
<span class="frm_icon_font frm_action_icon frm_error_icon edd_frm_status_icon <?php echo esc_attr( $icon_class ); ?>"></span> |
| 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' ); ?>"/> |
| 32 |
<p class="frm_license_msg"></p> |
| 33 |
</div> |
| 34 |
|
| 35 |
</div> |
| 36 |
<?php } ?> |
| 37 |
</div> |
| 38 |
|