[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
Tue Feb 25 20:17:01 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:               |     Focuses:  docs, performance
-------------------------+--------------------------------

Comment (by flixos90):

 Replying to [comment:21 westonruter]:
 > For example, caching plugins don't need to do any processing at all.
 They just need to capture the output buffer to put in the persistent
 object cache (for example) and maybe append an HTML comment to say that it
 was cached.

 That's what I covered with my note on having an action for the raw string,
 but not making it filterable, to discourage problematic patterns as
 mentioned.

 > Also, some applications on the output buffer would only need the
 lighter-weight HTML Tag Processor which doesn't have all of HTML's
 complicated parsing rules internalized, so such extensions shouldn't be
 required to use it.

 Maybe I'm missing something. Can you clarify what do you mean by lighter-
 weight HTML Tag Processor? What class is that, compared to what other
 class?

 > Note that Optimization Detective uses a subclass of
 `WP_HTML_Tag_Processor` so it wouldn't be able to use a single instance
 supplied by core anyway.

 Couldn't this be handled by e.g. a decorator pattern? Alternatively, you
 mentioned it should eventually use the Core class anyway.

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


More information about the wp-trac mailing list