| @@ -2,11 +2,12 @@ | ||
| 2 | 2 | \load_template( |
| 3 | 3 | __DIR__ . '/admin-header.php', |
| 4 | 4 | true, |
| 5 | 5 | array( |
| 6 | - 'settings' => '', | |
| 7 | - 'welcome' => 'active', | |
| 8 | - 'followers' => '', | |
| 6 | + 'settings' => '', | |
| 7 | + 'welcome' => 'active', | |
| 8 | + 'blog-profile' => '', | |
| 9 | + 'followers' => '', | |
| 9 | 10 | ) |
| 10 | 11 | ); |
| 11 | 12 | ?> |
| 12 | 13 | |
| @@ -16,11 +17,40 @@ | ||
| 16 | 17 | |
| 17 | 18 | <p><?php echo wp_kses( \__( 'Enter the fediverse with <strong>ActivityPub</strong>, broadcasting your blog to a wider audience. Attract followers, deliver updates, and receive comments from a diverse user base on <strong>Mastodon</strong>, <strong>Friendica</strong>, <strong>Pleroma</strong>, <strong>Pixelfed</strong>, and all <strong>ActivityPub</strong>-compliant platforms.', 'activitypub' ), array( 'strong' => array() ) ); ?></p> |
| 18 | 19 | </div> |
| 19 | 20 | |
| 20 | - <?php | |
| 21 | + <?php if ( \Activitypub\site_supports_blocks() ) : ?> | |
| 22 | + <div class="box"> | |
| 23 | + <h3><?php \esc_html_e( 'Bookmarklet', 'activitypub' ); ?></h3> | |
| 24 | + | |
| 25 | + <p> | |
| 26 | + <?php | |
| 27 | + $bookmarklet_url = \Activitypub\get_reply_intent_uri(); | |
| 28 | + | |
| 29 | + /* translators: %s is the domain of this site */ | |
| 30 | + $reply_from_template = __( 'Reply from %s', 'activitypub' ); | |
| 31 | + $button = sprintf( | |
| 32 | + '<a href="%s" class="button">%s</a>', | |
| 33 | + esc_attr( $bookmarklet_url ), // need to escape quotes for the bookmarklet | |
| 34 | + sprintf( $reply_from_template, \wp_parse_url( \home_url(), PHP_URL_HOST ) ) | |
| 35 | + ); | |
| 36 | + /* translators: %s is where the button HTML will be rendered. */ | |
| 37 | + $button_and_explanation_template = \__( | |
| 38 | + '%s Save this bookmarklet to reply to posts on other sites from your own blog! When visiting a post on another site, click the bookmarklet to start a reply.', | |
| 39 | + 'activitypub' | |
| 40 | + ); | |
| 41 | + | |
| 42 | + printf( $button_and_explanation_template, $button ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 43 | + | |
| 44 | + printf( ' <a href="%s">%s</a>', esc_url( \admin_url( 'tools.php#activitypub' ) ), esc_html__( 'For additional information, please visit the Tools page.', 'activitypub' ) ); | |
| 45 | + ?> | |
| 46 | + </p> | |
| 47 | + </div> | |
| 48 | + <?php | |
| 49 | + endif; | |
| 50 | + | |
| 21 | 51 | if ( ! \Activitypub\is_user_disabled( \Activitypub\Collection\Users::BLOG_USER_ID ) ) : |
| 22 | - $blog_user = new \Activitypub\Model\Blog_User(); | |
| 52 | + $blog_user = new \Activitypub\Model\Blog(); | |
| 23 | 53 | ?> |
| 24 | 54 | <div class="box"> |
| 25 | 55 | <h3><?php \esc_html_e( 'Blog profile', 'activitypub' ); ?></h3> |
| 26 | 56 | <p> |
| @@ -41,9 +71,9 @@ | ||
| 41 | 71 | <p> |
| 42 | 72 | <?php \esc_html_e( 'This blog profile will federate all posts written on your blog, regardless of the author who posted it.', 'activitypub' ); ?> |
| 43 | 73 | <p> |
| 44 | 74 | <p> |
| 45 | - <a href="<?php echo \esc_url_raw( \admin_url( '/options-general.php?page=activitypub&tab=settings' ) ); ?>"> | |
| 75 | + <a href="<?php echo \esc_url_raw( \admin_url( '/options-general.php?page=activitypub&tab=blog-profile ' ) ); ?>"> | |
| 46 | 76 | <?php \esc_html_e( 'Customize the blog profile', 'activitypub' ); ?> |
| 47 | 77 | </a> |
| 48 | 78 | </p> |
| 49 | 79 | </div> |