How to hook WPFC
-
Hi,
today I’ve noticed a “big problem”. I have to modify the HTML-code after the entire page has been rendered completely. Therefore I’m using a code like this:
function callback($buffer) { return $buffer; } function buffer_start() { ob_start("callback"); } function buffer_end() { ob_end_flush(); $content = ob_get_clean(); [...do my stuff...] } add_action('wp_head', 'buffer_start'); add_action('wp_footer', 'buffer_end');
On the first call of the page everything works fine. But after the first call the WPFC generated cached file is loaded and all my changes are gone.
In other words: WPFC writes the cache file before the page has been finished its rendering. That’s a big problem, because I have to do my code changes at the end of the page generation process – but BEFORE WPFC is writing the cache file.
How can this be done?
Thx for you help!
best regards,
Lars
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to hook WPFC’ is closed to new replies.