Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 16
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2/**
3 * Compact Search block pattern.
4 *
5 * Single-row toolbar (search input + filter popover + sort popover) over a
6 * compact result list. Mirrors the WordPress Dataview list layout.
7 *
8 * @package automattic/jetpack-search
9 */
10
11namespace Automattic\Jetpack\Search;
12
13register_block_pattern(
14    'jetpack-search/compact-search',
15    array(
16        'title'       => __( 'Compact Search', 'jetpack-search-pkg' ),
17        'description' => __( 'A compact Jetpack Search toolbar with inline filter and sort controls, plus a dense result list.', 'jetpack-search-pkg' ),
18        'categories'  => array( 'jetpack-search' ),
19        'keywords'    => array(
20            __( 'search', 'jetpack-search-pkg' ),
21            __( 'compact', 'jetpack-search-pkg' ),
22            __( 'list', 'jetpack-search-pkg' ),
23            __( 'jetpack search', 'jetpack-search-pkg' ),
24        ),
25        'content'     => '<!-- wp:group {"style":{"spacing":{"blockGap":"1rem"}}} -->
26<div class="wp-block-group">
27
28<!-- wp:group {"className":"jetpack-search-compact-toolbar","layout":{"type":"flex","flexWrap":"nowrap"}} -->
29<div class="wp-block-group jetpack-search-compact-toolbar">
30<!-- wp:jetpack-search/search-input /-->
31<!-- wp:jetpack-search/filters-popover -->
32<!-- wp:jetpack-search/active-filters /-->
33<!-- wp:jetpack-search/filter-checkbox {"filterType":"taxonomy","taxonomy":"category"} /-->
34<!-- wp:jetpack-search/filter-checkbox {"filterType":"taxonomy","taxonomy":"post_tag"} /-->
35<!-- wp:jetpack-search/filter-checkbox {"filterType":"post_type"} /-->
36<!-- /wp:jetpack-search/filters-popover -->
37<!-- wp:jetpack-search/results-sort {"displayAs":"popover"} /-->
38</div>
39<!-- /wp:group -->
40
41<!-- wp:jetpack-search/search-results -->
42<!-- wp:jetpack-search/results-count /-->
43<!-- wp:jetpack-search/results-list {"layout":"compact"} /-->
44<!-- wp:jetpack-search/results-load-more /-->
45<!-- wp:jetpack-search/powered-by /-->
46<!-- /wp:jetpack-search/search-results -->
47
48</div>
49<!-- /wp:group -->',
50    )
51);