forked from realbigplugins/client-dash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
client-dash.php
41 lines (33 loc) · 1012 Bytes
/
client-dash.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/*
Plugin Name: Client Dash
Description: Creating a more intuitive admin interface for clients.
Version: 1.2.1
Author: Kyle Maurer
Author URI: http://realbigmarketing.com/staff/kyle
*/
// Dashboard widgets
require_once(plugin_dir_path(__FILE__) . 'dashboard/dashboard.php');
// Create admin pages
require_once(plugin_dir_path(__FILE__) . 'admin/admin.php');
// Enhance the toolbar
require_once(plugin_dir_path(__FILE__) . 'toolbar/toolbar.php');
// Store admin color scheme for later
global $admin_colors;
/**
* Saves the color scheme for later.
*
* Wordpress normally purges this value pretty quickly, so we're saving it for ourselves.
*/
function cd_admin_colors() {
global $_wp_admin_css_colors, $admin_colors;
$admin_colors = $_wp_admin_css_colors;
}
add_action('admin_init', 'cd_admin_colors');
/**
* Include javascript.
*/
function cd_scripts() {
wp_enqueue_script('cd-scripts', plugin_dir_url(__FILE__) . 'js/client-dash.js');
}
add_action('admin_enqueue_scripts', 'cd_scripts');