Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#7033 closed enhancement (fixed)

Media uploades css fixes

Reported by: azaozz's profile azaozz Owned by:
Milestone: 2.6 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

Few css fixes for the media uploader, confirm delete of attachments from the library tab.

Attachments (3)

uploader-del-warn.patch (7.2 KB) - added by azaozz 16 years ago.
back-to-wp_admin_css.patch (738 bytes) - added by azaozz 16 years ago.
7033-docs.diff (2.1 KB) - added by mdawaffe 16 years ago.
inline docs for wp_admin_css()

Download all attachments as: .zip

Change History (9)

#1 @ryan
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [7988]) Few css fixes for the media uploader, confirm delete of attachments from the library tab. Props azaozz. fixes #7033

#2 @ryan
16 years ago

Style note: This switches from wp_admin_css() to wp_enqueue_style(). Either will work, but we usually use wp_admin_css().

#3 @azaozz
16 years ago

I thought wp_admin_css() was going to be deprecated for queueing styles in favor of wp_enqueue_style(). Changing it back.

#4 @ryan
16 years ago

Let's check with mdawaffe and pick which way we want to go. I don't care as long as we're consistent.

#5 @mdawaffe
16 years ago

I'd lean toward wp_enqueue_style() since it's marginally faster; wp_admin_css() is a wrapper. But I don't really care either.

wp_admin_css() does more things, though, in order to stay backward compatible:

  1. Will act exactly like wp_enqueue_style() if the wp_print_styles action has not yet been called.
  2. Will directly echo out the stylesheet link if the wp_print_styles action has been called.
  3. If the script is not registered, wp_admin_css() will behave like it used to: create a url under the assumption the argument passed was a filename (minus the .css extension) and echo out a stylesheet link to that file.

The most efficient thing to do would be to use wp_enqueue_style() when we want to enqueue and wp_print_styles() when we want to print directly (e.g. wp_print_styles action has already happened at least once, admin_print_styles action is never called on that page, etc.).

wp_admin_css tries to make that decision for us. I'm not sure if using one function to do those two things is more or less confusing.

Inline docs for wp_admin_css attached.

@mdawaffe
16 years ago

inline docs for wp_admin_css()

#6 @ryan
16 years ago

(In [7994]) inline docs for wp_admin_css(). Props mdawaffe. see #7033

Note: See TracTickets for help on using tickets.