Created
November 30, 2017 12:07
-
-
Save kartikparmar/fca2448e4e334ef73da17078aa3dc58b to your computer and use it in GitHub Desktop.
Including the wcodw_style.css file on the WordPress dashboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This function include wcodw_style.css file only on dashboard. | |
*/ | |
function wc_my_enqueue_scripts_css() { | |
$screen = get_current_screen(); | |
$screen_id = $screen ? $screen->id : ''; | |
if ( $screen_id == "dashboard" ) { | |
wp_enqueue_style( 'wc-orders-dashboard-widget-css', get_template_directory_uri() . '/css/wcodw_style.css' ); | |
} | |
} | |
add_action( 'admin_enqueue_scripts', 'wc_my_enqueue_scripts_css' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment