WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#14559 closed defect (bug) (wontfix)

wp_admin_css Filter Broken

Reported by: tech163 Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0.1
Component: Administration Keywords:
Focuses: Cc:

Description

I think the wp_admin_css filter is broken. I created a plugin with the following code, and nothing happens (I did activate it though).

function wp_admin_css_blah($test) {
	die($test);
}

add_filter('wp_admin_css', 'wp_admin_css_blah');

Change History (3)

comment:1 nacin3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Core CSS files will get processed via WP_Styles, so the filter isn't very helpful anymore.

comment:2 noxion3 years ago

  • Cc noxion added
  • Resolution wontfix deleted
  • Status changed from closed to reopened

Look, I've fixed that adding the action hook to my template:

function my_wp_admin_css() {
 echo '<link rel="stylesheet" type="text/css" href="' .get_bloginfo('template_url').'/wp-admin.css">';
}

add_action('wp_admin_css','my_wp_admin_css');
apply_filters( 'wp_admin_css','my_wp_admin_css' );

comment:3 scribu3 years ago

  • Resolution set to wontfix
  • Status changed from reopened to closed

If you call apply_filters() yourself, you might as well just call my_wp_admin_css() directly.

Please don't re-open this ticket. You're free to leave further comments, though.

Last edited 3 years ago by scribu (previous) (diff)
Note: See TracTickets for help on using tickets.