[wp-trac] [WordPress Trac] #58366: Shortcode Support Regained but Content Filters are messing with Shortcode HTML

WordPress Trac noreply at wordpress.org
Tue Aug 22 21:41:47 UTC 2023


#58366: Shortcode Support Regained but Content Filters are messing with Shortcode
HTML
-------------------------------------------------+-------------------------
 Reporter:  domainsupport                        |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  6.4
Component:  Shortcodes                           |     Version:  6.2.2
 Severity:  normal                               |  Resolution:
 Keywords:  needs-testing has-testing-info       |     Focuses:
  needs-unit-tests has-patch                     |
-------------------------------------------------+-------------------------

Comment (by kubiq):

 and there is another weird problem...
 if you have a `WP_Query` loop inside the shortcode and you try to call
 `the_content()` then it seems that `'the_content'` filter is not triggered
 for the first item, but it works for all other items then...
 I can fix this by calling `apply_filters( 'the_content', '' );` before the
 loop

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


More information about the wp-trac mailing list