Filters whether the template should be output-buffered for enhancement.
Description
By default, an output buffer is only started if a 'wp_template_enhancement_output_buffer' filter has been added or if a plugin has added a 'wp_finalized_template_enhancement_output_buffer' action. For this default to apply, either of the hooks must be added by the time the template is included at the 'wp_before_include_template' action. This allows template responses to be streamed unless the there is code which depends on an output buffer being opened. This filter allows a site to opt in to adding such template enhancement filters later during the rendering of the template.
851* enhancement filters later during the rendering of the template.852*853* @since 6.9.0854*855* @param bool$use_output_buffer Whether an output buffer is started.856*/857return(bool)apply_filters('wp_should_output_buffer_template_for_enhancement',has_filter('wp_template_enhancement_output_buffer')||has_action('wp_finalized_template_enhancement_output_buffer'));858}859860/**861* Starts the template enhancement output buffer.862*863* This function is called immediately before the template is included.
History
Introduced in 6.9.0. Unchanged from 6.9.7 through 7.1.0.