Make WordPress Core

Opened 15 years ago

Closed 13 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 Owned by: F J Kaiser
Priority: normal Milestone:
Component: General Version: 2.6
Severity: normal Keywords: has-patch
Cc: Focuses:

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 15 years ago.

Download all attachments as: .zip

Change History (10)

@F J Kaiser
15 years ago

#1 @F J Kaiser
15 years ago

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

#2 @F J Kaiser
15 years ago

  • Version → 3.3

#3 @F J Kaiser
15 years ago

  • Owner set to F J Kaiser
  • Status new → assigned

#4 follow-up: @nacin
15 years ago

  • Version 3.3 → 3.2.1

Duplicate of #14559?

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

Replying to nacin:

Duplicate of #14559?

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

#6 @ocean90
15 years ago

  • Keywords close added
  • Version 3.2.1 → 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
14 years ago

  • Cc Ninos Ego added
  • Version 2.6 → 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
14 years ago

  • Version 3.3.1 → 2.6

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

#9 @DrewAPicture
13 years ago

  • Keywords close removed
  • Milestone Awaiting Review
  • Resolution → invalid
  • Status assigned → 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.