PluginProbe
ActivityPub / trunk
ActivityPub vtrunk
9.3.1 9.3.0 9.2.2 9.2.1 9.2.0 9.1.0 9.0.2 9.0.1 9.0.0 8.3.0 8.2.1 8.2.0 8.1.1 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.2.0 1.3.0 2.0.0 2.0.1 2.1.0 2.1.1 All 160 releases
activitypub / patterns / follow-page.php

follow-page.php in ActivityPub trunk, at patterns/follow-page.php

46 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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