Opened 20 months ago
Last modified 20 months ago
#54931 new defect (bug)
get_block_template filter not fired when template saved in posts
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.9 |
Component: | Editor | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
The \get_block_template()
function fires a 'get_block_template' filter at the end that allows for plugins to filter the content etc.
However, this only works if the template was retrieved from a theme's template file, if the template has been edited it is saved into the posts
table.
When a template (part) is found in the posts
table the function exits early with the found template but does not wrap the return in a call to the 'get_block_template'.
This means plugins and custom code do not get a chance to filter the template's content or properties when re-editing after a template has had an initial edit.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Simple patch.