Opened 17 years ago
Closed 17 years ago
#8000 closed defect (bug) (fixed)
wp_register_style should default the media to 'all'
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 2.7 | Priority: | normal |
| Severity: | normal | Version: | 2.7 |
| Component: | Template | Keywords: | konqueror wp_register_style wp_enqueue_style wp_styles has-patch |
| Focuses: | Cc: |
Description
What makes this a defect is that some browsers, such as Konqueror, will disregard the stylesheet if the media attribute is empty.
By default, if you register a style like so:
wp_register_style('handle', 'path/to/style.css');
The media is set to false, so it comes out like this:
<link rel='stylesheet' href='/path/to/style.css?vers=whatever' type='text/css' media='' />
The do_item() method of WP_Styles does set media to "all" if $media is unset. However, when it comes from wp_enqueue_style on default, the media variable is set---to false.
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
(In [9404]) Default media type to all. Fixes #8000 props filosofo.