From a0f479a3344fac89d3185847895a8085f5ac7a8c Mon Sep 17 00:00:00 2001 From: root Date: Mon, 27 May 2019 03:48:21 +0800 Subject: [PATCH] Admin dashboard scheme --- functions.php | 77 ++++++++++++++++++++++++------- inc/dash-scheme.php | 52 +++++++++++++++++++++ options.php | 109 +++++++++++++++++++++++++++++++++++++------- style.css | 2 +- 4 files changed, 207 insertions(+), 33 deletions(-) create mode 100644 inc/dash-scheme.php diff --git a/functions.php b/functions.php index b2c295e..97fb675 100644 --- a/functions.php +++ b/functions.php @@ -7,7 +7,7 @@ * @package Sakura */ -define( 'SAKURA_VERSION', '3.1.6' ); +define( 'SAKURA_VERSION', '3.1.7' ); define( 'BUILD_VERSION', '1' ); define( 'JSDELIVR_VERSION', '3.6.7' ); @@ -1346,19 +1346,12 @@ add_filter('site_url', 'wpadmin_filter', 10, 3); } */ -function admin_style() { +function admin_ini() { wp_enqueue_style('admin-styles-fix-icon', get_site_url() . '/wp-includes/css/dashicons.css'); - wp_enqueue_style('cus-styles-light', get_site_url() . '/wp-content/themes/Sakura/inc/css/dashboard-fix.css'); - if ( get_user_option( 'admin_color' ) == "light" ) { - wp_enqueue_style('cus-styles-light', get_site_url() . '/wp-content/themes/Sakura/inc/css/dashboard-light.css'); - } + wp_enqueue_style('cus-styles-fit', get_site_url() . '/wp-content/themes/Sakura/inc/css/dashboard-fix.css'); + wp_enqueue_script( 'lazyload', 'https://cdn.jsdelivr.net/npm/lazyload@2.0.0-beta.2/lazyload.min.js' ); } -add_action('admin_enqueue_scripts', 'admin_style'); - -function custom_register_admin_scripts() { - wp_enqueue_script( 'lazyload', 'https://cdn.jsdelivr.net/npm/lazyload@2.0.0-beta.2/lazyload.min.js' ); -} -add_action( 'admin_enqueue_scripts', 'custom_register_admin_scripts' ); +add_action('admin_enqueue_scripts', 'admin_ini'); function custom_admin_js() { echo '