swift_performance_buffer

Filter for the content of the optimized page, just before return after optimization. This filter can be used to manipulate HTML source after optimization.

Parameters

$html

string, contains the full source code of the optimized page


Return

string


Example

// add extra footer comment
add_filter('swift_performance_buffer', function($html){
 return str_replace('</body>', '<!-- This is an extra comment --></body>'); 
});