[wp-trac] Re: [WordPress Trac] #8480: apply_filters('post_gallery', '', $attr) should be apply_filters('post_gallery', $attr);

WordPress Trac wp-trac at lists.automattic.com
Fri Dec 5 01:12:47 GMT 2008


#8480: apply_filters('post_gallery', '', $attr) should be
apply_filters('post_gallery', $attr);
-----------------------------------------------+----------------------------
 Reporter:  chionsas.org                       |        Owner:         
     Type:  defect                             |       Status:  closed 
 Priority:  normal                             |    Milestone:         
Component:  Gallery                            |      Version:  2.7    
 Severity:  normal                             |   Resolution:  invalid
 Keywords:  gallery, shortcode, apply_filters  |  
-----------------------------------------------+----------------------------
Comment (by chionsas.org):

 Ok, accepting two parameters is a good workaround (should have thought of
 that one myself), but I still don't understand the need for the first
 parameter (since it's always an empty string).. :?

 I understand the purpose and use of post_gallery filter (I'm using it to
 completely replace the gallery_shorttag() function with one of my own),
 but still don't get why there are TWO arguments passed, when even the
 original gallery_shorttag() function takes in only one (an array of inline
 attributes).

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8480#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list