AMP_Base_Sanitizer::add_buffering_hooks( array $args = array() )

Description #

Add filters to manipulate output during output buffering before the DOM is constructed.

Add actions and filters before the page is rendered so that the sanitizer can fix issues during output buffering. This provides an alternative to manipulating the DOM in the sanitize method. This is a static function because it is invoked before the class is instantiated, as the DOM is not available yet. This method is only called when 'amp' theme support is present. It is conceptually similar to the AMP_Base_Embed_Handler class's register_embed method.

See also

  • {@see AMP_Base_Embed_Handler::register_embed()}

Parameters #


(array) (Optional) Args.

Default value:array()

Changelog #

Version Description
1.0 Introduced.