From c4d565c60c59e30799b000875695e53b85eaa455 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 7 Aug 2020 12:28:16 -0700 Subject: [PATCH] Ensure paired browsing template_include filter overrides other filters --- includes/class-amp-theme-support.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-amp-theme-support.php b/includes/class-amp-theme-support.php index 4fa1c8f5315..1ebe08648df 100644 --- a/includes/class-amp-theme-support.php +++ b/includes/class-amp-theme-support.php @@ -311,7 +311,7 @@ public static function finish_init() { if ( self::is_paired_available() ) { self::setup_paired_browsing_client(); add_action( 'template_redirect', [ __CLASS__, 'sanitize_url_for_paired_browsing' ] ); - add_filter( 'template_include', [ __CLASS__, 'serve_paired_browsing_experience' ] ); + add_filter( 'template_include', [ __CLASS__, 'serve_paired_browsing_experience' ], PHP_INT_MAX ); } $has_query_var = (