[wp-trac] [WordPress Trac] #36270: Allow filtering of the final HTML output of media related shortcodes
    WordPress Trac 
    noreply at wordpress.org
       
    Fri Mar 18 02:33:05 UTC 2016
    
    
  
#36270: Allow filtering of the final HTML output of media related shortcodes
--------------------------+-----------------------------
 Reporter:  gnotaras      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Sometimes it is required to further process the final HTML output of the
 media related shortcodes, eg {{{caption}}} or {{{gallery}}}, so as to add
 extra HTML code such as enclosing div or span elements or just modify the
 existing HTML code during run time.
 For instance the final output of {{{img_caption_shortcode}}} could be
 filtered:
 https://core.trac.wordpress.org/browser/tags/4.4.2/src/wp-
 includes/media.php#L1537
 Passing all relevant image attachment data, like ID and size, would also
 be very useful.
 I hope that I am not missing anything but right now the only way to insert
 code inside the {{{<figure>}}} or {{{<figcaption>}}} block seems to be the
 complete override of the {{{img_caption_shortcode}}} function.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36270>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
    
    
More information about the wp-trac
mailing list