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 product-search results template for the Jetpack Search |
| 4 | * Embedded experience — WooCommerce-product counterpart of |
| 5 | * `classic-theme-search.php`. |
| 6 | * |
| 7 | * Wraps the bundled `jetpack-search-product-results.html` block markup in the |
| 8 | * active theme's `get_header()` / `get_footer()` so the block-rendered |
| 9 | * product results sit inside the theme's chrome — the classic-theme |
| 10 | * counterpart to the FSE block template fronted via |
| 11 | * `search_template_hierarchy` on block themes. |
| 12 | * |
| 13 | * Loaded via the `template_include` filter in |
| 14 | * `Search_Blocks::route_classic_theme_search_template()`; reachable only on |
| 15 | * `is_search()` with Embedded saved + classic theme + WooCommerce product |
| 16 | * search + the `jetpack_search_override_woocommerce_search_template` option on. |
| 17 | * |
| 18 | * @package automattic/jetpack-search |
| 19 | */ |
| 20 | |
| 21 | if ( ! defined( 'ABSPATH' ) ) { |
| 22 | exit; |
| 23 | } |
| 24 | |
| 25 | get_header(); |
| 26 | |
| 27 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- bundled inline CSS, no untrusted input. |
| 28 | echo \Automattic\Jetpack\Search\Search_Blocks::get_classic_theme_layout_style(); |
| 29 | |
| 30 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- do_blocks renders trusted bundled markup. |
| 31 | echo do_blocks( \Automattic\Jetpack\Search\Search_Blocks::get_classic_theme_product_search_body() ); |
| 32 | |
| 33 | get_footer(); |