Skip to content

Commit

Permalink
v2.4 released
Browse files Browse the repository at this point in the history
  • Loading branch information
Jedi knight authored and amin0_000 committed Oct 1, 2016
1 parent 24932ca commit e6a7fff
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
24 changes: 23 additions & 1 deletion software-license-manager/menu/slm-add-licenses.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ function wp_lic_mgr_add_licenses_menu() {

if (isset($_POST['save_record'])) {

//Check nonce
if ( !isset($_POST['slm_add_edit_nonce_val']) || !wp_verify_nonce($_POST['slm_add_edit_nonce_val'], 'slm_add_edit_nonce_action' )){
//Nonce check failed.
wp_die("Error! Nonce verification failed for license save action.");
}

do_action('slm_add_edit_interface_save_submission');

//TODO - do some validation
$license_key = $_POST['license_key'];
$max_domains = $_POST['max_allowed_domains'];
Expand Down Expand Up @@ -111,7 +119,12 @@ function wp_lic_mgr_add_licenses_menu() {
echo $message;
echo '</p></div>';
}else{
echo '<div id="message" class="error">' . $errors . '</div>'; }
echo '<div id="message" class="error">' . $errors . '</div>';
}

$data = array('row_id' => $id, 'key' => $license_key);
do_action('slm_add_edit_interface_save_record_processed',$data);

}

?>
Expand All @@ -129,6 +142,7 @@ function wp_lic_mgr_add_licenses_menu() {
<div class="inside">

<form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
<?php wp_nonce_field('slm_add_edit_nonce_action', 'slm_add_edit_nonce_val' ) ?>
<table class="form-table">

<?php
Expand Down Expand Up @@ -259,6 +273,14 @@ function wp_lic_mgr_add_licenses_menu() {

</table>

<?php
$data = array('row_id' => $id, 'key' => $license_key);
$extra_output = apply_filters('slm_add_edit_interface_above_submit','', $data);
if(!empty($extra_output)){
echo $extra_output;
}
?>

<div class="submit">
<input type="submit" class="button-primary" name="save_record" value="Save Record" />
</div>
Expand Down
8 changes: 6 additions & 2 deletions software-license-manager/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Contributors: Tips and Tricks HQ, Peter Petreski, Ruhul Amin
Donate link: https://www.tipsandtricks-hq.com/software-license-manager-plugin-for-wordpress
Tags: license key, serial key, manager, license, serial, key, selling, sell, license activation, manage license, software license, software license manager
Requires at least: 3.0
Requires at least: 4.0
Tested up to: 4.6
Stable tag: 2.3
Stable tag: 2.4
License: GPLv2 or later

Create and manage license keys for your software applications easily
Expand Down Expand Up @@ -53,6 +53,10 @@ https://www.tipsandtricks-hq.com/software-license-manager-plugin-for-wordpress

== Changelog ==

= 2.4 =
- Added new action and filter hooks in the add/edit interface so an addon can extend the functionality of that interface.
- Added nonce check in the add/edit license interface.

= 2.3 =
- Added a new feature to enable auto expiry of the license keys. You can enable this option from the settings.
- If you don't specify a expiry date, when adding a manual license key, it will use the current date plus 1 year as the expiry date.
Expand Down
4 changes: 2 additions & 2 deletions software-license-manager/slm_bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
Plugin Name: Software License Manager
Version: 2.3
Version: 2.4
Plugin URI: https://www.tipsandtricks-hq.com/software-license-manager-plugin-for-wordpress
Author: Tips and Tricks HQ
Author URI: https://www.tipsandtricks-hq.com/
Expand All @@ -14,7 +14,7 @@

//Short name/slug "SLM" or "slm"

define('WP_LICENSE_MANAGER_VERSION', "2.3");
define('WP_LICENSE_MANAGER_VERSION', "2.4");
define('WP_LICENSE_MANAGER_DB_VERSION', '1.3');
define('WP_LICENSE_MANAGER_FOLDER', dirname(plugin_basename(__FILE__)));
define('WP_LICENSE_MANAGER_URL', plugins_url('',__FILE__));
Expand Down

0 comments on commit e6a7fff

Please sign in to comment.