[wp-trac] [WordPress Trac] #26343: has_shortcode not recognizing nested shortcodes

WordPress Trac noreply at wordpress.org
Sun Jul 13 04:58:13 UTC 2014


#26343: has_shortcode not recognizing nested shortcodes
----------------------------------------------------+------------------
 Reporter:  sunyatasattva                           |       Owner:
     Type:  defect (bug)                            |      Status:  new
 Priority:  normal                                  |   Milestone:  4.0
Component:  Shortcodes                              |     Version:  3.6
 Severity:  normal                                  |  Resolution:
 Keywords:  has-patch needs-unit-tests 2nd-opinion  |     Focuses:
----------------------------------------------------+------------------

Comment (by katzwebdesign):

 I just ran into this issue, and I'd love to see it fixed. I do see the
 point that @engelen is making, so here's an idea: add a third parameter to
 the `has_shortcode()` function: `$recursive`.

 That would allow for the default to stay "pure". The patch would then
 read:

 ` } elseif ( $recursive && isset( $shortcode[5] ) && has_shortcode(
 $shortcode[5], $tag ) ) { `

 Thoughts?

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


More information about the wp-trac mailing list