mirror of
https://gh.wpcy.net/https://github.com/michelve/software-license-manager.git
synced 2026-07-16 20:43:10 +08:00
fixed minor links giving 404 from jquery ui library added: activity log for licenses api added: woocommerce order details with license, status, and license type added: subscribers, now you can manage licenses by subscribers added: screen options added: filter by tags inside the license table added: admin stats dashboard fixed: minor depreciation errors bugs: fixed another minor errors and bugs
80 lines
No EOL
2.9 KiB
PHP
80 lines
No EOL
2.9 KiB
PHP
<?php
|
||
|
||
if (!defined('WPINC')) {
|
||
die;
|
||
}
|
||
|
||
|
||
/**
|
||
* Add a widget to the dashboard.
|
||
*
|
||
* This function is hooked into the 'wp_dashboard_setup' action below.
|
||
*/
|
||
function slm_add_dashboard_widgets()
|
||
{
|
||
|
||
wp_add_dashboard_widget(
|
||
'slm_dashboard_widget', // Widget slug.
|
||
'Software license manager', // Title.
|
||
'slm_dashboard_widget_function' // Display function.
|
||
);
|
||
}
|
||
add_action('wp_dashboard_setup', 'slm_add_dashboard_widgets');
|
||
|
||
/**
|
||
* Create the function to output the contents of our Dashboard Widget.
|
||
*/
|
||
function slm_dashboard_widget_function()
|
||
{ ?>
|
||
|
||
<ul class="slm_status_list">
|
||
<li class="total-licenses">
|
||
<a href="<?php echo admin_url('admin.php?page=slm_overview'); ?>">
|
||
<div class="icon"> <span class="dashicons dashicons-admin-network"></span> </div>
|
||
<strong>Manage licenses</strong> Total active licenses <span class="badge"> <?php echo SLM_Utility::get_total_licenses(); ?> </span>
|
||
</a> </li>
|
||
<li class="active-licenses">
|
||
<a href="<?php echo admin_url('admin.php?page=slm_overview&s=active&view=active'); ?>">
|
||
<div class="icon"><span class="dashicons dashicons-yes-alt"></span></div>
|
||
<strong> <?php echo SLM_Utility::count_licenses('active'); ?> </strong> Active licenses
|
||
</a>
|
||
</li>
|
||
<li class="pending-licenses">
|
||
<a href="<?php echo admin_url('admin.php?page=slm_overview&s=pending&view=pending'); ?>">
|
||
<div class="icon"> <span class="dashicons dashicons-warning"></span> </div>
|
||
<strong><?php echo SLM_Utility::count_licenses('pending '); ?></strong> Pending licenses
|
||
</a>
|
||
</li>
|
||
<li class=" blocked-licenses">
|
||
<a href="<?php echo admin_url('admin.php?page=slm_overview&s=blocked&view=blocked'); ?>">
|
||
<div class="icon"> <span class="dashicons dashicons-dismiss"></span> </div>
|
||
<strong><?php echo SLM_Utility::count_licenses('blocked '); ?></strong> Blocked licenses
|
||
</a>
|
||
</li>
|
||
<li class="expired-licenses">
|
||
<a href="<?php echo admin_url('admin.php?page=slm_overview&s=expired&view=expired'); ?>">
|
||
<div class="icon"> <span class="dashicons dashicons-calendar-alt"></span> </div>
|
||
<strong><?php echo SLM_Utility::count_licenses('expired'); ?></strong> Expired licenses
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
|
||
<div class="table recent_licenses">
|
||
<hr>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th scope="col">
|
||
Recent Licenses <a href="<?php echo admin_url('admin.php?page=slm_overview'); ?>"> – View All</a>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<?php SLM_Utility::slm_wp_dashboards_stats('5'); ?>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<?php
|
||
}
|
||
?>
|