From: Steve Sutton Date: Mon, 2 Feb 2015 19:20:12 +0000 (-0500) Subject: Adding Stats page X-Git-Tag: v1.36^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=0f7b1d078130704510440542ce6ebf300ad7444f;p=WP-Plugins%2FGaslightify.git Adding Stats page Bring in the stats using iframe --- diff --git a/Gaslightify.php b/Gaslightify.php index 8138463..9d9fe7a 100755 --- a/Gaslightify.php +++ b/Gaslightify.php @@ -4,7 +4,7 @@ Plugin Name: Gaslightify Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates Description: A gasline to a Wordpress website. -Version: 1.35 +Version: 1.35 Author: Gaslight Media Author URI: http://www.gaslightmedia.com License: Gaslight Media @@ -22,10 +22,10 @@ add_action('admin_enqueue_scripts', 'interface_client_safeguard'); function interface_client_safeguard() { if ( current_user_can( 'manage_options' ) ) { /* A user with admin privileges */ - + } else { /* A user without admin privileges */ - wp_enqueue_script('GaslightifyJs', plugins_url('js/Gaslightify.js', __FILE__),array(),'1.0.0', true); + wp_enqueue_script('GaslightifyJs', plugins_url('js/Gaslightify.js', __FILE__),array(),'1.0.0', true); wp_enqueue_style('GaslightifyStyle', plugins_url('css/Gaslightify.css', __FILE__)); if ( is_multisite() ) { wp_enqueue_style('GaslightifyMSStyle', plugins_url('css/GaslightifyMS.css', __FILE__)); @@ -33,7 +33,7 @@ function interface_client_safeguard() { } if (!current_user_can('edit_posts')) { ?> - background-size: auto; } - + 'my-account', 'title' => $newtitle, ) ); - } - add_filter( 'admin_bar_menu', 'replace_howdy',25 ); +} +add_filter( 'admin_bar_menu', 'replace_howdy',25 ); +function glm_stats(){ + echo '
+ + +
+'; +} +function Gaslightify_menu() { + add_menu_page('Server Stats', 'Server Stats', 'edit_posts', 'glm_stats', 'glm_stats', 'dashicons-chart-area'); +} +add_action('admin_menu', 'Gaslightify_menu'); + ?>