Skip to content

Commit 0af9dfc

Browse files
anaemnesismatticbot
authored andcommitted
Inline Search: Mitigate P2 bug (#43503)
* P2 bug mitigation * changelog * Let us disable the filter entirely for now Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/15078192502 Upstream-Ref: Automattic/jetpack@1f8dcd1
1 parent d18ed81 commit 0af9dfc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ This is an alpha version! The changes listed here are not final.
1616
### Changed
1717
- Update package dependencies.
1818

19+
### Fixed
20+
- Mitigate bug with certain P2 theme
21+
1922
## [0.49.0] - 2025-05-15
2023
### Added
2124
- Add query filters support to Inline Search. [#43441]

src/inline-search/class-inline-search-highlighter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ public function __construct( array $search_result_ids = array(), ?array $results
4545
* Set up the WordPress filters for highlighting.
4646
*/
4747
public function setup(): void {
48-
add_filter( 'the_title', array( $this, 'filter_highlighted_title' ), 10, 2 );
48+
// phpcs:ignore Squiz.PHP.CommentedOutCode.Found -- Temporarily disabled due to incompatibility with P2 theme
49+
// add_filter( 'the_title', array( $this, 'filter_highlighted_title' ), 10, 2 );
4950
add_filter( 'the_excerpt', array( $this, 'filter_highlighted_excerpt' ) );
5051
add_filter( 'render_block_core/post-excerpt', array( $this, 'filter_render_highlighted_block' ), 10, 3 );
5152
}

0 commit comments

Comments
 (0)