| 1 |
<?php |
| 2 |
/** |
| 3 |
* Fediverse Follow Page pattern. |
| 4 |
* |
| 5 |
* @package Activitypub |
| 6 |
*/ |
| 7 |
|
| 8 |
$selected_user = ! \Activitypub\is_user_type_disabled( 'blog' ) ? 'blog' : 'inherit'; |
| 9 |
|
| 10 |
\register_block_pattern( |
| 11 |
'activitypub/follow-page', |
| 12 |
array( |
| 13 |
'title' => _x( 'Fediverse Follow Page', 'Block pattern title', 'activitypub' ), |
| 14 |
'categories' => array( 'activitypub' ), |
| 15 |
'keywords' => array( |
| 16 |
_x( 'follow', 'Block pattern keyword', 'activitypub' ), |
| 17 |
_x( 'fediverse', 'Block pattern keyword', 'activitypub' ), |
| 18 |
_x( 'page', 'Block pattern keyword', 'activitypub' ), |
| 19 |
_x( 'followers', 'Block pattern keyword', 'activitypub' ), |
| 20 |
), |
| 21 |
'description' => _x( 'Follow page layout with profile and followers list.', 'Block pattern description', 'activitypub' ), |
| 22 |
'viewportWidth' => 1200, |
| 23 |
'postTypes' => array( 'page' ), |
| 24 |
'blockTypes' => array( 'core/post-content' ), |
| 25 |
'content' => '<!-- wp:group {"layout":{"type":"constrained"}} --> |
| 26 |
<div class="wp-block-group"> |
| 27 |
<!-- wp:paragraph --> |
| 28 |
<p>' . esc_html_x( 'Follow this blog on Mastodon or the Fediverse and get new posts delivered straight to your feed.', 'Block pattern content', 'activitypub' ) . '</p> |
| 29 |
<!-- /wp:paragraph --> |
| 30 |
<!-- wp:spacer {"height":"32px"} --> |
| 31 |
<div style="height:32px" aria-hidden="true" class="wp-block-spacer"></div> |
| 32 |
<!-- /wp:spacer --> |
| 33 |
<!-- wp:activitypub/follow-me {"selectedUser":"' . $selected_user . '","className":"is-style-profile"} /--> |
| 34 |
<!-- wp:spacer {"height":"32px"} --> |
| 35 |
<div style="height:32px" aria-hidden="true" class="wp-block-spacer"></div> |
| 36 |
<!-- /wp:spacer --> |
| 37 |
<!-- wp:activitypub/followers {"selectedUser":"' . $selected_user . '"} --> |
| 38 |
<div class="wp-block-activitypub-followers"><!-- wp:heading {"level":3} --> |
| 39 |
<h3 class="wp-block-heading">' . esc_html_x( 'Our Fediverse Followers', 'Block pattern content', 'activitypub' ) . '</h3> |
| 40 |
<!-- /wp:heading --></div> |
| 41 |
<!-- /wp:activitypub/followers --> |
| 42 |
</div> |
| 43 |
<!-- /wp:group -->', |
| 44 |
) |
| 45 |
); |
| 46 |
|