[wp-trac] [WordPress Trac] #58366: Shortcode Support Regained but Content Filters are messing with Shortcode HTML
WordPress Trac
noreply at wordpress.org
Fri Sep 27 07:53:40 UTC 2024
#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.7
Component: Shortcodes | Version: 6.2.2
Severity: normal | Resolution:
Keywords: needs-testing has-testing-info | Focuses:
needs-unit-tests has-patch |
-------------------------------------------------+-------------------------
Comment (by kubiq):
So the problem is that reusable blocks (patterns) used in templates and
template part and containing shortcodes will never run `do_shortcode`
function.
My quickfix solution is to add `do_shortcode` into the `do_blocks`
function in `\wp-includes\blocks.php` so eg. instead of `return $output;`
we would have `return do_shortcode( $output );`
Or maybe it can be done in `render_block` function if we need some
conditional triggering of that `do_shortcode`... I'm not sure how
"resources expensive" is that function, I didn't measure it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58366#comment:87>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list