[wp-trac] [WordPress Trac] #40225: Using wp_enqueue_style() with 'admin_enqueue_scripts' results in unresponsive "Screen Options" button
WordPress Trac
noreply at wordpress.org
Tue Mar 21 21:31:41 UTC 2017
#40225: Using wp_enqueue_style() with 'admin_enqueue_scripts' results in
unresponsive "Screen Options" button
-------------------------------------------+-----------------------------
Reporter: shastjion | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.7.3
Severity: normal | Keywords:
Focuses: ui, accessibility, javascript |
-------------------------------------------+-----------------------------
Attempting to enqueue a .css file to style admin area elements using the
following results in a unresponsive "screen options" button:
{{{
function load_admin_style() {
wp_enqueue_style('admin_css', get_template_directory_uri() .
'/library/css/style.css');
}
add_action( 'admin_enqueue_scripts', 'load_admin_style' );
}}}
The .css is present and loaded correctly however.
---
Using wp_enqueue_script() results in both the .css file and the other js
being loaded correctly:
{{{
function load_admin_style() {
wp_enqueue_script('admin_css', get_template_directory_uri() .
'/library/css/style.css');
}
add_action( 'admin_enqueue_scripts', 'load_admin_style' );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40225>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list