| 1 |
<?php |
| 2 |
/** |
| 3 |
* Block patterns registration. |
| 4 |
* |
| 5 |
* @package gutenberg |
| 6 |
*/ |
| 7 |
|
| 8 |
// Initial Query block patterns. |
| 9 |
register_block_pattern( |
| 10 |
'query/large-posts', |
| 11 |
array( |
| 12 |
'title' => __( 'Large', 'gutenberg' ), |
| 13 |
'scope' => array( |
| 14 |
'inserter' => false, |
| 15 |
'block' => array( 'core/query' ), |
| 16 |
), |
| 17 |
'content' => '<!-- wp:post-title {"isLink":true} /--> |
| 18 |
<!-- wp:post-featured-image {"isLink":true,"align":"wide"} /--> |
| 19 |
<!-- wp:post-excerpt /--> |
| 20 |
<!-- wp:separator --> |
| 21 |
<hr class="wp-block-separator"/> |
| 22 |
<!-- /wp:separator --> |
| 23 |
<!-- wp:post-date /-->', |
| 24 |
) |
| 25 |
); |
| 26 |
|
| 27 |
register_block_pattern( |
| 28 |
'query/medium-posts', |
| 29 |
array( |
| 30 |
'title' => __( 'Medium', 'gutenberg' ), |
| 31 |
'scope' => array( |
| 32 |
'inserter' => false, |
| 33 |
'block' => array( 'core/query' ), |
| 34 |
), |
| 35 |
'content' => '<!-- wp:columns {"align":"wide"} --> |
| 36 |
<div class="wp-block-columns alignwide"><!-- wp:column {"width":"66.66%"} --> |
| 37 |
<div class="wp-block-column" style="flex-basis:66.66%"><!-- wp:post-featured-image {"isLink":true} /--></div> |
| 38 |
<!-- /wp:column --> |
| 39 |
<!-- wp:column {"width":"33.33%"} --> |
| 40 |
<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:post-title {"isLink":true} /--> |
| 41 |
<!-- wp:post-excerpt /--></div> |
| 42 |
<!-- /wp:column --></div> |
| 43 |
<!-- /wp:columns -->', |
| 44 |
) |
| 45 |
); |
| 46 |
|
| 47 |
register_block_pattern( |
| 48 |
'query/small-posts', |
| 49 |
array( |
| 50 |
'title' => __( 'Small', 'gutenberg' ), |
| 51 |
'scope' => array( |
| 52 |
'inserter' => false, |
| 53 |
'block' => array( 'core/query' ), |
| 54 |
), |
| 55 |
'content' => '<!-- wp:columns {"verticalAlignment":"center"} --> |
| 56 |
<div class="wp-block-columns are-vertically-aligned-center"><!-- wp:column {"verticalAlignment":"center","width":"25%"} --> |
| 57 |
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:25%"><!-- wp:post-featured-image {"isLink":true} /--></div> |
| 58 |
<!-- /wp:column --> |
| 59 |
<!-- wp:column {"verticalAlignment":"center","width":"75%"} --> |
| 60 |
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:75%"><!-- wp:post-title {"isLink":true} /--></div> |
| 61 |
<!-- /wp:column --></div> |
| 62 |
<!-- /wp:columns -->', |
| 63 |
) |
| 64 |
); |
| 65 |
|