From 5f925b9ae2d2a87a968fb897d7f8c976d52e52f5 Mon Sep 17 00:00:00 2001 From: nickchomey <88559987+nickchomey@users.noreply.github.com> Date: Thu, 11 Aug 2022 22:10:55 -0600 Subject: [PATCH] Allow excerpt to override integrated requests allow_excerpt_html() currently exits early when called within an AJAX request. This replaces the simple is_admin() check with your more comprehensive (and filterable) is_integrated_request() function --- includes/classes/Feature/Search/Search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/classes/Feature/Search/Search.php b/includes/classes/Feature/Search/Search.php index 5979f17d0..3f050f095 100644 --- a/includes/classes/Feature/Search/Search.php +++ b/includes/classes/Feature/Search/Search.php @@ -252,7 +252,7 @@ public function add_search_highlight_tags( $formatted_args, $args ) { * for the selected tag to be displayed in it. */ public function allow_excerpt_html() { - if ( is_admin() ) { + if ( ! Utils\is_integrated_request( 'highlighting', [ 'public' ] ) ) { return; }