Make WordPress Core

Opened 13 years ago

Closed 12 years ago

#19130 closed defect (bug) (invalid)

current wp-login.php call to wp_admin_css() bypasses its own filter

Reported by: f-j-kaiser's profile F J Kaiser Owned by: f-j-kaiser's profile F J Kaiser
Milestone: Priority: normal
Severity: normal Version: 2.6
Component: General Keywords: has-patch
Focuses: Cc:

Description

The current situation in wp-login.php looks like the following:

	wp_admin_css( 'login', true );
	wp_admin_css( 'colors-fresh', true );

Looking at /wp-includes/general-template.php and wp_admin_css( $file = 'wp-admin', $force_echo = false ); tells that this bypasses the filter calls as the function returns if $force_echo is true. The filters are called after that. This doesn't make sense as the filter will never work this way. Changing wp_admin_css() is no option, so I suggest to change the calls to it in login_head.

Attachments (1)

19130.patch (657 bytes) - added by F J Kaiser 13 years ago.

Download all attachments as: .zip

Change History (10)

@F J Kaiser
13 years ago

#1 @F J Kaiser
13 years ago

  • Cc 24-7@… added
  • Keywords has-patch added

#2 @F J Kaiser
13 years ago

  • Version set to 3.3

#3 @F J Kaiser
13 years ago

  • Owner set to F J Kaiser
  • Status changed from new to assigned

#4 follow-up: @nacin
13 years ago

  • Version changed from 3.3 to 3.2.1

Duplicate of #14559?

#5 in reply to: ↑ 4 @F J Kaiser
13 years ago

Replying to nacin:

Duplicate of #14559?

Afaik, wp-login.php doesn't behaves like this.

#6 @ocean90
13 years ago

  • Keywords close added
  • Version changed from 3.2.1 to 2.6

Comment from nacin:

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


The filter wp_admin_css will never be fired for core files, no matter if $force_echo is true or false. If you use a custom file the filter can be used.

Behaviour introduced in #7011.

#7 @Ninos Ego
13 years ago

  • Cc Ninos Ego added
  • Version changed from 2.6 to 3.3.1

I hope in the next version you can fix this bug. Because I want to do all things with wordpress, and this issue is like a jail for me. I have got a custom login stylesheet. 80% of the code are !important atribute. Beyond my login page is not compatible with other browsers..

#8 @ocean90
13 years ago

  • Version changed from 3.3.1 to 2.6

Version number indicates when the bug was initially introduced/reported.

#9 @DrewAPicture
12 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from assigned to closed

As @ocean90 notes in comment:6, the wp_admin_css filter will never be fired for core files — if a custom file is passed, the filter will fire. This is a feature, not a bug.

In a way, it is conceptually similar to the admin_body_class filter: core admin body classes can't be filtered, but new ones can be tacked on.

Note: See TracTickets for help on using tickets.