[wp-trac] [WordPress Trac] #58333: WordPress 6.2.1 Shortcodes some shortcode no longer works!
WordPress Trac
noreply at wordpress.org
Thu May 18 14:15:14 UTC 2023
#58333: WordPress 6.2.1 Shortcodes some shortcode no longer works!
--------------------------+-----------------------
Reporter: jorcus | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.2.2
Component: Shortcodes | Version: 6.2.1
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+-----------------------
Comment (by asafm7):
@domainsupport
This demonstrates my thinking:
{{{
add_filter('get_block_templates', 'do_shortcodes_in_block_templates', 10,
3);
function do_shortcodes_in_block_templates($query_result) {
foreach ($query_result as &$block_template) {
$block_template->content = do_shortcode($block_template->content);
}
return $query_result;
}
add_filter('get_block_template', 'do_shortcodes_in_block_template', 10,
3);
function do_shortcodes_in_block_template($block_template) {
$block_template->content = do_shortcode($block_template->content);
return $block_template;
}
}}}
It is a (working) draft, so try at your own risk :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58333#comment:73>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list