Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 6 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
| 1 | <?php |
| 2 | /** |
| 3 | * Classic-theme search results template for the Jetpack Search Embedded |
| 4 | * experience. |
| 5 | * |
| 6 | * Wraps the bundled `jetpack-search.html` block markup in the active theme's |
| 7 | * `get_header()` / `get_footer()` so the block-rendered results sit inside the |
| 8 | * theme's chrome — the classic-theme counterpart to the FSE block template |
| 9 | * fronted via `search_template_hierarchy` on block themes. |
| 10 | * |
| 11 | * Loaded via the `template_include` filter in |
| 12 | * `Search_Blocks::route_classic_theme_search_template()`; reachable only on |
| 13 | * `is_search()` with Embedded saved + classic theme. |
| 14 | * |
| 15 | * @package automattic/jetpack-search |
| 16 | */ |
| 17 | |
| 18 | if ( ! defined( 'ABSPATH' ) ) { |
| 19 | exit; |
| 20 | } |
| 21 | |
| 22 | get_header(); |
| 23 | |
| 24 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- bundled inline CSS, no untrusted input. |
| 25 | echo \Automattic\Jetpack\Search\Search_Blocks::get_classic_theme_layout_style(); |
| 26 | |
| 27 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- do_blocks renders trusted bundled markup. |
| 28 | echo do_blocks( \Automattic\Jetpack\Search\Search_Blocks::get_classic_theme_search_body() ); |
| 29 | |
| 30 | get_footer(); |