[wp-trac] [WordPress Trac] #43258: Output buffer template rendering and add filter for post-processing (e.g. caching, optimization)
WordPress Trac
noreply at wordpress.org
Wed Feb 26 20:28:29 UTC 2025
#43258: Output buffer template rendering and add filter for post-processing (e.g.
caching, optimization)
-------------------------+--------------------------------
Reporter: nextendweb | Owner: westonruter
Type: enhancement | Status: accepted
Priority: normal | Milestone: 6.8
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: docs, performance
-------------------------+--------------------------------
Comment (by westonruter):
I just added a [https://github.com/WordPress/wordpress-
develop/pull/8412#discussion_r1972355289 suggestion] to my PR that after
the `wp_template_output_buffer` filter has applied there should actually
be an //action// like `wp_final_template_output_buffer` which fires and
is passed the final output buffer string as its argument. This is the
action that caching plugins should use to capture the output for storage.
It wouldn't be good for caching plugins to rely on the filter to capture
the output since there could be another plugin that adds a later filter
which changes it somehow, and then there could be a war of action
priorities. Using a filter just to capture a value without making any
changes is also doesn't seem like the right application of filters.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43258#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list