Skip to content

Commit

Permalink
Fix passing args to start_output_buffering
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Apr 28, 2018
1 parent b2d3242 commit 25d3e97
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion includes/class-amp-theme-support.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,11 @@ public static function add_hooks() {
* Start output buffering at very low priority for sake of plugins and themes that use template_redirect
* instead of template_include.
*/
add_action( 'template_redirect', array( __CLASS__, 'start_output_buffering' ), 0 );
add_action( 'template_redirect', function() {
AMP_Theme_Support::start_output_buffering( array(
'cancelable' => class_exists( 'WP_UnitTestCase' ),
) );
} );

// Commenting hooks.
add_filter( 'wp_list_comments_args', array( __CLASS__, 'set_comments_walker' ), PHP_INT_MAX );
Expand Down

0 comments on commit 25d3e97

Please sign in to comment.