[wp-trac] [WordPress Trac] #24990: Nested Shortcode Inside [caption]

WordPress Trac noreply at wordpress.org
Tue Oct 7 14:30:06 UTC 2014


#24990: Nested Shortcode Inside [caption]
----------------------------------------+-----------------------------
 Reporter:  prionkor                    |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  Media                       |     Version:  3.6
 Severity:  normal                      |  Resolution:
 Keywords:  needs-unit-tests has-patch  |     Focuses:
----------------------------------------+-----------------------------

Comment (by pputzer):

 Replying to [comment:6 nofearinc]:
 > I'm not sure what's the issue with calling `do_shortcode` for the
 caption, whether it's set via the media popup or as an attribute, so a
 simple call added to the caption callback.

 I'm pretty sure that this patch does not help at all. The problem is the
 regex line {{{if ( preg_match( '#((?:<a [^>]+>\s*)?<img
 [^>]+>(?:\s*</a>)?)(.*)#is', $content, $matches ) ) {}}} that throws out
 any shortcode enclosing the image and/or link tag in the {{{$content}}}.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/24990#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list