[wp-trac] [WordPress Trac] #11035: gallery function put invalidate style in body

WordPress Trac wp-trac at lists.automattic.com
Mon Oct 26 21:03:29 UTC 2009


#11035: gallery function put invalidate style in body
--------------------------+-------------------------------------------------
 Reporter:  thomask       |       Owner:                            
     Type:  defect (bug)  |      Status:  new                       
 Priority:  high          |   Milestone:  Unassigned                
Component:  Validation    |     Version:  2.8.5                     
 Severity:  minor         |    Keywords:  gallery, validation, style
--------------------------+-------------------------------------------------

Comment(by hakre):

 The bug is in the function gallery_shortcode() inside the global
 namespace. It's located in the initial string that is send to the
 gallery_style filter as first paramter in ~ line 716.

 Next to the invalid output, the filter name is misleading. It does not
 only contain the stylesheet (which could be then re-useable without any
 fuss in the head). Instead it contains an opening <div> element as well.

 A "fix" could be to extract that style element after the filter has run
 and enqueing it into the head section. For this output bufferung must have
 been used which is not the case.

 So this is not a fix (even if it would work it's pretty akward).

 Default galleries html code should be more modular sothat a more generic
 css can be put inside the default themes head / stylesheets. That means
 replacing IDs with classes and general classes. This should be usefull for
 pretty much of all standard use-cases.

 Other cases can then use filters / actions to handle the galleries output
 (apply css to the galleries html by using style attributes). Should make
 the whole complex more useable.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11035#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list