jetpack
/
jetpack_vendor
/
automattic
/
jetpack-search
/
src
/
search-blocks
/
patterns
/
compact-search.php
compact-search.php in Jetpack – WP Security, Backup, Speed, & Growth 16.3, at jetpack_vendor/automattic/jetpack-search/src/search-blocks/patterns/compact-search.php
| 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 | |
| 11 | namespace Automattic\Jetpack\Search; |
| 12 | |
| 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | exit( 0 ); |
| 15 | } |
| 16 | |
| 17 | register_block_pattern( |
| 18 | 'jetpack-search/compact-search', |
| 19 | array( |
| 20 | 'title' => __( 'Compact Search', 'jetpack-search-pkg' ), |
| 21 | 'description' => __( 'A compact Jetpack Search toolbar with inline filter and sort controls, plus a dense result list.', 'jetpack-search-pkg' ), |
| 22 | 'categories' => array( 'jetpack-search' ), |
| 23 | 'keywords' => array( |
| 24 | __( 'search', 'jetpack-search-pkg' ), |
| 25 | __( 'compact', 'jetpack-search-pkg' ), |
| 26 | __( 'list', 'jetpack-search-pkg' ), |
| 27 | __( 'jetpack search', 'jetpack-search-pkg' ), |
| 28 | ), |
| 29 | 'content' => '<!-- wp:group {"style":{"spacing":{"blockGap":"1rem"}}} --> |
| 30 | <div class="wp-block-group"> |
| 31 | |
| 32 | <!-- wp:group {"className":"jetpack-search-compact-toolbar","layout":{"type":"flex","flexWrap":"nowrap"}} --> |
| 33 | <div class="wp-block-group jetpack-search-compact-toolbar"> |
| 34 | <!-- wp:jetpack-search/search-input /--> |
| 35 | <!-- wp:jetpack-search/filters-popover --> |
| 36 | <!-- wp:jetpack-search/active-filters /--> |
| 37 | <!-- wp:jetpack-search/filter-checkbox {"filterType":"taxonomy","taxonomy":"category"} /--> |
| 38 | <!-- wp:jetpack-search/filter-checkbox {"filterType":"taxonomy","taxonomy":"post_tag"} /--> |
| 39 | <!-- wp:jetpack-search/filter-checkbox {"filterType":"post_type"} /--> |
| 40 | <!-- /wp:jetpack-search/filters-popover --> |
| 41 | <!-- wp:jetpack-search/results-sort {"displayAs":"popover"} /--> |
| 42 | </div> |
| 43 | <!-- /wp:group --> |
| 44 | |
| 45 | <!-- wp:jetpack-search/search-results --> |
| 46 | <!-- wp:jetpack-search/results-count /--> |
| 47 | <!-- wp:jetpack-search/results-list {"layout":"compact"} /--> |
| 48 | <!-- wp:jetpack-search/no-results --> |
| 49 | <!-- wp:jetpack-search/no-results-slot /--> |
| 50 | <!-- wp:jetpack-search/no-results-slot {"condition":"filtered"} /--> |
| 51 | <!-- wp:jetpack-search/no-results-slot {"condition":"error"} /--> |
| 52 | <!-- /wp:jetpack-search/no-results --> |
| 53 | <!-- wp:jetpack-search/results-load-more /--> |
| 54 | <!-- wp:jetpack-search/powered-by /--> |
| 55 | <!-- /wp:jetpack-search/search-results --> |
| 56 | |
| 57 | </div> |
| 58 | <!-- /wp:group -->', |
| 59 | ) |
| 60 | ); |
| 61 |