| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 3 |
|
| 4 |
$license = get_option( 'wpvr_edd_license_key' ); |
| 5 |
$status = get_option( 'wpvr_edd_license_status' ); |
| 6 |
?> |
| 7 |
<!-- This file should display the admin pages --> |
| 8 |
<div class="row"> |
| 9 |
<div class="rex-onboarding" style="min-height: 250px !important;"> |
| 10 |
<form method="post" action="options.php" style="width: 100%;"> |
| 11 |
|
| 12 |
<?php settings_fields('wpvr_edd_license'); ?> |
| 13 |
|
| 14 |
<table class="form-table"> |
| 15 |
<tbody> |
| 16 |
<tr valign="top"> |
| 17 |
<th scope="row" valign="top"> |
| 18 |
<?php _e('License Key','wpvr'); ?> |
| 19 |
</th> |
| 20 |
<td> |
| 21 |
<input id="wpvr_edd_license_key" name="wpvr_edd_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $license ); ?>" /> |
| 22 |
<label class="description" for="wpvr_edd_license_key"><?php _e('Enter your license key, save changes and activate.','wpvr'); ?></label> |
| 23 |
</td> |
| 24 |
</tr> |
| 25 |
<?php if( false !== $license ) { ?> |
| 26 |
<tr valign="top"> |
| 27 |
<th scope="row" valign="top"> |
| 28 |
<?php _e('Activate License','wpvr'); ?> |
| 29 |
</th> |
| 30 |
<td> |
| 31 |
<?php if( $status !== false && $status == 'valid' ) { ?> |
| 32 |
<span style="color:green;"><?php _e('active'); ?></span> |
| 33 |
<?php wp_nonce_field( 'wpvr_edd_nonce', 'wpvr_edd_nonce' ); ?> |
| 34 |
<input type="submit" class="button-secondary" name="wpvr_edd_license_deactivate" value="<?php _e('Deactivate License','wpvr'); ?>"/> |
| 35 |
<?php } else {?> |
| 36 |
|
| 37 |
<?php wp_nonce_field( 'wpvr_edd_nonce', 'wpvr_edd_nonce' ); ?> |
| 38 |
<input type="submit" class="button-secondary" name="wpvr_edd_license_activate" value="<?php _e('Activate License','wpvr'); ?>"/> |
| 39 |
<?php } ?> |
| 40 |
</td> |
| 41 |
</tr> |
| 42 |
<?php } ?> |
| 43 |
</tbody> |
| 44 |
</table> |
| 45 |
<?php submit_button(); ?> |
| 46 |
</form> |
| 47 |
</div> |
| 48 |
</div> |
| 49 |
|
| 50 |
|