Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
94.44% covered (success)
94.44%
17 / 18
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2/**
3 * Product Search Page block pattern.
4 *
5 * WooCommerce-only: composes `filters-product` / `filter-wc-*` blocks, so the
6 * `wc-` filename prefix keeps `register_patterns()` from loading it on non-Woo
7 * sites. Content mirrors `templates/jetpack-search-overlay-product.html`.
8 *
9 * @package automattic/jetpack-search
10 */
11
12namespace Automattic\Jetpack\Search;
13
14$content = Search_Blocks::pattern_content_from_template( 'jetpack-search-overlay-product.html' );
15if ( '' === $content ) {
16    return;
17}
18
19register_block_pattern(
20    'jetpack-search/wc-product-search-page',
21    array(
22        'title'       => __( 'Product Search Page', 'jetpack-search-pkg' ),
23        'description' => __( 'A full-page product search layout with sidebar filters and a product result grid powered by Jetpack Search.', 'jetpack-search-pkg' ),
24        'categories'  => array( 'jetpack-search' ),
25        'keywords'    => array(
26            __( 'search', 'jetpack-search-pkg' ),
27            __( 'product', 'jetpack-search-pkg' ),
28            __( 'woocommerce', 'jetpack-search-pkg' ),
29            __( 'jetpack search', 'jetpack-search-pkg' ),
30        ),
31        'content'     => $content,
32    )
33);