| 1 |
<?php |
| 2 |
/** |
| 3 |
* Fediverse Sidebar pattern. |
| 4 |
* |
| 5 |
* @package Activitypub |
| 6 |
*/ |
| 7 |
|
| 8 |
\register_block_pattern( |
| 9 |
'activitypub/social-sidebar', |
| 10 |
array( |
| 11 |
'title' => _x( 'Fediverse Sidebar', 'Block pattern title', 'activitypub' ), |
| 12 |
'categories' => array( 'activitypub' ), |
| 13 |
'keywords' => array( |
| 14 |
_x( 'sidebar', 'Block pattern keyword', 'activitypub' ), |
| 15 |
_x( 'widget', 'Block pattern keyword', 'activitypub' ), |
| 16 |
_x( 'fediverse', 'Block pattern keyword', 'activitypub' ), |
| 17 |
_x( 'follow', 'Block pattern keyword', 'activitypub' ), |
| 18 |
_x( 'followers', 'Block pattern keyword', 'activitypub' ), |
| 19 |
), |
| 20 |
'description' => _x( 'Compact sidebar widget with follow button and followers list.', 'Block pattern description', 'activitypub' ), |
| 21 |
'viewportWidth' => 400, |
| 22 |
'blockTypes' => array( 'core/template-part/sidebar' ), |
| 23 |
'content' => '<!-- wp:group {"layout":{"type":"constrained"}} --> |
| 24 |
<div class="wp-block-group"> |
| 25 |
<!-- wp:heading {"level":3} --> |
| 26 |
<h3 class="wp-block-heading">' . esc_html_x( 'Follow on Fediverse', 'Block pattern content', 'activitypub' ) . '</h3> |
| 27 |
<!-- /wp:heading --> |
| 28 |
<!-- wp:activitypub/follow-me {"selectedUser":"inherit","className":"is-style-button"} /--> |
| 29 |
<!-- wp:spacer {"height":"16px"} --> |
| 30 |
<div style="height:16px" aria-hidden="true" class="wp-block-spacer"></div> |
| 31 |
<!-- /wp:spacer --> |
| 32 |
<!-- wp:activitypub/followers {"selectedUser":"inherit","per_page":5} --> |
| 33 |
<!-- wp:heading {"level":4} --> |
| 34 |
<h4 class="wp-block-heading">' . esc_html_x( 'Recent Followers', 'Block pattern content', 'activitypub' ) . '</h4> |
| 35 |
<!-- /wp:heading --> |
| 36 |
<!-- /wp:activitypub/followers --> |
| 37 |
</div> |
| 38 |
<!-- /wp:group -->', |
| 39 |
) |
| 40 |
); |
| 41 |
|