#7033 closed enhancement (fixed)
Media uploades css fixes
Reported by: | 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)
Change History (9)
#2
@
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
@
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
@
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
@
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:
- Will act exactly like wp_enqueue_style() if the wp_print_styles action has not yet been called.
- Will directly echo out the stylesheet link if the wp_print_styles action has been called.
- 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.
(In [7988]) Few css fixes for the media uploader, confirm delete of attachments from the library tab. Props azaozz. fixes #7033