[wp-trac] [WordPress Trac] #8000: wp_register_style should default the media to 'all'

WordPress Trac wp-trac at lists.automattic.com
Wed Oct 29 14:30:28 GMT 2008


#8000: wp_register_style should default the media to 'all'
----------------------+-----------------------------------------------------
 Reporter:  filosofo  |       Owner:  anonymous                                                       
     Type:  defect    |      Status:  new                                                             
 Priority:  normal    |   Milestone:  2.7                                                             
Component:  Template  |     Version:  2.7                                                             
 Severity:  normal    |    Keywords:  konqueror wp_register_style wp_enqueue_style wp_styles has-patch
----------------------+-----------------------------------------------------
 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.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8000>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list