Commit 6b1074b0 authored by Olivier van Helden's avatar Olivier van Helden

Grid info and grid status dashboards

parent 097f5a28
......@@ -4,7 +4,7 @@ Donate link: http://speculoos.world/
Tags: comments, spam
Requires at least: 5.0
Tested up to: 5.2
Stable tag: 0.3.1
Stable tag: 0.3.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
......@@ -111,6 +111,8 @@ directory take precedence. For example, `/assets/screenshot-1.png` would win ove
* use settings page as main OpenSim admin page
* added shortcode explanation to admin status page
= 0.3.2 =
* gridinfo and gridstatus dashboard
== Upgrade Notice ==
......
......@@ -158,3 +158,5 @@ function w4os_status_page()
}
require(plugin_dir_path(__FILE__) . 'status.php');
}
require(plugin_dir_path(__FILE__) . 'dashboard.php');
<?php
/**
* The admin-specific functionality of the plugin.
*
* @link http://speculoos.world
* @since 0.3.2
*
* @package OpenSim
* @subpackage OpenSim/admin
* @author Olivier van Helden <olivier@van-helden.net>
*/
add_action( 'wp_dashboard_setup', 'w4os_dashboard_add_widgets' );
function w4os_dashboard_add_widgets() {
wp_add_dashboard_widget(
'w4os_dashboard_widget_gridinfo',
"OpenSim " . __( 'Grid info', 'w4os' ),
'w4os_dashboard_widget_gridinfo_handler'
);
wp_add_dashboard_widget(
'w4os_dashboard_widget_gridstatus',
"OpenSim " . __( 'Grid status', 'w4os' ),
'w4os_dashboard_widget_gridstatus_handler'
);
}
function w4os_dashboard_widget_gridstatus_handler() {
print(w4os_gridstatus_shortcode(array("title"=>"")));
}
function w4os_dashboard_widget_gridinfo_handler() {
print(w4os_gridinfo_shortcode(array("title"=>"")));
}
......@@ -16,7 +16,7 @@
* Plugin Name: OpenSimulator
* Plugin URI: https://git.magiiic.com/opensimulator/w4os
* Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area.
* Version: 0.3.1
* Version: 0.3.2
* Author: Speculoos
* Author URI: http://speculoos.world
* License: GPL-2.0+
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment