Skip to content

Commit

Permalink
6.1.9
Browse files Browse the repository at this point in the history
Enhanced security measures, optimized plugin functionality, and resolved minor bugs.
  • Loading branch information
michelve committed Nov 19, 2024
1 parent 7c18a6a commit 1ab8114
Show file tree
Hide file tree
Showing 42 changed files with 3,934 additions and 5,064 deletions.
18 changes: 17 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,20 @@ package-lock.json
.Icon
/node_modules/
/node_modules/*
.vscode
.vscode
/samples/
samples/LicenseAPI.php
samples/LicenseAPI.php
samples/GetLicenseInfo.php
samples/DeactivateLicense.php
samples/CreateLicense.php
samples/CoreConfig.php
samples/CheckLicense.php
samples/LicenseAPI.php
samples/GetLicenseInfo.php
samples/DeactivateLicense.php
samples/CreateLicense.php
samples/CoreConfig.php
samples/CheckLicense.php
samples/GetLicenseInfo.php
samples/DeactivateLicense.php
16 changes: 8 additions & 8 deletions admin/includes/cronjobs/slm-tasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function slm_add_daily_cron_schedule($schedules) {
// Define a daily interval (24 hours = 86400 seconds)
$schedules['slm_daily'] = array(
'interval' => 86400,
'display' => __('Every 24 Hours', 'slmplus'),
'display' => __('Every 24 Hours', 'slm-plus'),
);
return $schedules;
}
Expand Down Expand Up @@ -86,8 +86,8 @@ function slm_clear_scheduled_events() {
function slm_add_manual_license_check_page() {
add_submenu_page(
'tools.php', // Parent slug, 'Tools' menu
__('Run License Check', 'slmplus'), // Page title
__('Run License Check', 'slmplus'), // Menu title
__('Run License Check', 'slm-plus'), // Page title
__('Run License Check', 'slm-plus'), // Menu title
'manage_options', // Capability required
'slm-manual-license-check', // Menu slug
'slm_manual_license_check_page' // Callback function
Expand All @@ -110,23 +110,23 @@ function slm_manual_license_check_page() {
$expired_licenses = slm_run_license_check();

if (!empty($expired_licenses)) {
echo '<div class="updated"><p>' . __('License check completed. The following licenses have expired:', 'slmplus') . '</p></div>';
echo '<div class="updated"><p>' . esc_html__('License check completed. The following licenses have expired:', 'slm-plus') . '</p></div>';
} else {
echo '<div class="updated"><p>' . __('License check completed. No expired licenses found.', 'slmplus') . '</p></div>';
echo '<div class="updated"><p>' . esc_html__('License check completed. No expired licenses found.', 'slm-plus') . '</p></div>';
}
}

// Display the button in the admin area
echo '<div class="wrap">';
echo '<h2>' . __('Run License Check Manually', 'slmplus') . '</h2>';
echo '<h2>' . esc_html__('Run License Check Manually', 'slm-plus') . '</h2>';
echo '<form method="post">';
wp_nonce_field('slm_manual_check_action', 'slm_manual_check_nonce');
echo '<input type="submit" name="slm_manual_check" class="button-primary" value="' . __('Run License Check', 'slmplus') . '">';
echo '<input type="submit" name="slm_manual_check" class="button-primary" value="' . esc_attr__('Run License Check', 'slm-plus') . '">';
echo '</form>';

// Output expired licenses if available
if (!empty($expired_licenses)) {
echo '<h3>' . __('Expired Licenses:', 'slmplus') . '</h3>';
echo '<h3>' . esc_html__('Expired Licenses:', 'slm-plus') . '</h3>';
echo '<ul>';
foreach ($expired_licenses as $license) {
echo '<li>' . esc_html($license) . '</li>';
Expand Down
40 changes: 20 additions & 20 deletions admin/includes/partials/stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,100 +2,100 @@
<li class="stats total-licenses">
<div>
<div class="icon"> <span class="dashicons dashicons-admin-network"></span> </div>
<div class="info"> <span class="badge"> <?php echo SLM_Utility::get_total_licenses(); ?></span></div>
<div class="info"> <span class="badge"> <?php echo esc_html(SLM_Utility::get_total_licenses()); ?></span></div>
</div>
<div class="description">
<span><?php _e('Total licenses', 'slmplus');?></span>
<span><?php esc_html_e('Total licenses', 'slm-plus'); ?></span>
</div>
</li>

<li class="stats total-licenses weekly">
<div>
<div class="icon"> <span class="dashicons dashicons-calendar-alt"></span> </div>
<div class="info"> <span class="badge"> <?php echo SLM_Utility::getstats_licenses('date_created', 7); ?></span></div>
<div class="info"> <span class="badge"> <?php echo esc_html(SLM_Utility::getstats_licenses('date_created', 7)); ?></span></div>
</div>
<div class="description">
<span><?php _e('Licenses this week', 'slmplus');?></span>
<span><?php esc_html_e('Licenses this week', 'slm-plus'); ?></span>
</div>
</li>

<li class="stats total-licenses monthly">
<div>
<div class="icon"> <span class="dashicons dashicons-calendar-alt"></span> </div>
<div class="info"> <span class="badge"> <?php echo SLM_Utility::getstats_licenses('date_created', 31); ?></span></div>
<div class="info"> <span class="badge"> <?php echo esc_html(SLM_Utility::getstats_licenses('date_created', 31)); ?></span></div>
</div>
<div class="description">
<span><?php _e('Licenses this month', 'slmplus');?></span>
<span><?php esc_html_e('Licenses this month', 'slm-plus'); ?></span>
</div>
</li>

<li class="stats active-licenses">
<div>
<div class="icon"><span class="dashicons dashicons-yes-alt"></span></div>
<div class="info"> <span class="badge"><?php echo SLM_Utility::count_licenses('active'); ?> </span></div>
<div class="info"> <span class="badge"><?php echo esc_html(SLM_Utility::count_licenses('active')); ?> </span></div>
</div>
<div class="description">
<span><?php _e('Active licenses', 'slmplus');?></span>
<span><?php esc_html_e('Active licenses', 'slm-plus'); ?></span>
</div>
</li>

<li class="stats pending-licenses">
<div>
<div class="icon"> <span class="dashicons dashicons-warning"></span> </div>
<div class="info"> <span class="badge"><?php echo SLM_Utility::count_licenses('pending '); ?></span></div>
<div class="info"> <span class="badge"><?php echo esc_html(SLM_Utility::count_licenses('pending')); ?></span></div>
</div>
<div class="description">
<span><?php _e('Pending licenses', 'slmplus');?></span>
<span><?php esc_html_e('Pending licenses', 'slm-plus'); ?></span>
</div>
</li>

<li class="stats blocked-licenses">
<div>
<div class="icon"> <span class="dashicons dashicons-dismiss"></span> </div>
<div class="info"> <span class="badge"><?php echo SLM_Utility::count_licenses('blocked '); ?></span></div>
<div class="info"> <span class="badge"><?php echo esc_html(SLM_Utility::count_licenses('blocked')); ?></span></div>
</div>
<div class="description">
<span><?php _e('Blocked licenses', 'slmplus');?></span>
<span><?php esc_html_e('Blocked licenses', 'slm-plus'); ?></span>
</div>
</li>

<li class="stats logs">
<div>
<div class="icon"> <span class="dashicons dashicons-media-default"></span></span> </div>
<div class="info"> <span class="badge"><?php echo SLM_Utility::count_logrequest(); ?></span></div>
<div class="info"> <span class="badge"><?php echo esc_html(SLM_Utility::count_logrequest()); ?></span></div>
</div>
<div class="description">
<span><?php _e('Logs saved', 'slmplus');?></span>
<span><?php esc_html_e('Logs saved', 'slm-plus'); ?></span>
</div>
</li>

<li class="stats reminders">
<div>
<div class="icon"> <span class="dashicons dashicons-media-default"></span></span> </div>
<div class="info"> <span class="badge"><?php echo SLM_Utility::count_emailsent(); ?></span></div>
<div class="info"> <span class="badge"><?php echo esc_html(SLM_Utility::count_emailsent()); ?></span></div>
</div>
<div class="description">
<span><?php _e('Reminders sent', 'slmplus');?></span>
<span><?php esc_html_e('Reminders sent', 'slm-plus'); ?></span>
</div>
</li>

<li class="stats expired-licenses">
<div>
<div class="icon"> <span class="dashicons dashicons-calendar-alt"></span> </div>
<div class="info"> <span class="badge"><?php echo SLM_Utility::count_licenses('expired'); ?></span></div>
<div class="info"> <span class="badge"><?php echo esc_html(SLM_Utility::count_licenses('expired')); ?></span></div>
</div>
<div class="description">
<span><?php _e('Expired licenses', 'slmplus');?></span>
<span><?php esc_html_e('Expired licenses', 'slm-plus'); ?></span>
</div>
</li>

<li class="stats aboutoexpire">
<div>
<div class="icon"> <span class="dashicons dashicons-calendar-alt"></span> </div>
<div class="info"> <span class="badge"> <?php echo SLM_Utility::get_lic_expiringsoon(); ?></span></div>
<div class="info"> <span class="badge"> <?php echo esc_html(SLM_Utility::get_lic_expiringsoon()); ?></span></div>
</div>
<div class="description">
<span><?php _e('Licenses about to expire', 'slmplus');?></span>
<span><?php esc_html_e('Licenses about to expire', 'slm-plus'); ?></span>
</div>
</li>
</ul>
Expand Down
Loading

0 comments on commit 1ab8114

Please sign in to comment.