wordpress-activitypub/templates/welcome.php

143 lines
8.1 KiB
PHP
Raw Normal View History

2022-12-02 20:44:56 +01:00
<?php
\load_template(
\dirname( __FILE__ ) . '/admin-header.php',
true,
array(
2023-05-31 13:47:37 +02:00
'settings' => '',
'welcome' => 'active',
'followers' => '',
2022-12-02 20:44:56 +01:00
)
);
?>
<div class="privacy-settings-body hide-if-no-js">
<h2><?php \esc_html_e( 'Welcome', 'activitypub' ); ?></h2>
2022-12-05 17:45:56 +01:00
<p><?php \esc_html_e( 'With ActivityPub your blog becomes part of a federated social network. This means you can share and talk to everyone using the ActivityPub protocol, including users of Friendica, Pleroma and Mastodon.', 'activitypub' ); ?></p>
2023-06-28 14:22:27 +02:00
<?php if ( ! \Activitypub\is_user_disabled( \ActivityPub\User_Factory::BLOG_USER_ID ) ) : ?>
<h3><?php \esc_html_e( 'Blog Account', 'activitypub' ); ?></h3>
<p>
<?php
$blog_user = new \Activitypub\Model\Blog_User();
2022-12-05 18:23:12 +01:00
echo wp_kses(
2022-12-02 20:44:56 +01:00
\sprintf(
2022-12-05 18:23:12 +01:00
// translators:
\__(
2023-05-31 08:49:33 +02:00
'People can follow your Blog by using the username <code>%1$s</code> or the URL <code>%2$s</code>. This Blog-User will federate all posts written on your Blog, regardless of the User who posted it. You can customize the Blog-User on the <a href="%3$s">Settings</a> page.',
2022-12-05 18:23:12 +01:00
'activitypub'
),
\esc_attr( $blog_user->get_resource() ),
\esc_url_raw( $blog_user->get_url() ),
\esc_url_raw( \admin_url( '/options-general.php?page=activitypub&tab=settings' ) )
),
'default'
);
?>
</p>
2023-06-28 14:22:27 +02:00
<?php endif; ?>
<?php if ( ! \Activitypub\is_user_disabled( get_current_user_id() ) ) : ?>
<h3><?php \esc_html_e( 'Personal Account', 'activitypub' ); ?></h3>
<p>
<?php
$user = \Activitypub\User_Factory::get_by_id( wp_get_current_user()->ID );
echo wp_kses(
\sprintf(
// translators:
\__(
'People can also follow you by using your Username <code>%1$s</code> or your Author-URL <code>%2$s</code>. Users who can not access this settings page will find their username on the <a href="%3$s">Edit Profile</a> page.',
'activitypub'
),
\esc_attr( $user->get_resource() ),
\esc_url_raw( $user->get_url() ),
2022-12-02 20:44:56 +01:00
\esc_url_raw( \admin_url( 'profile.php#activitypub' ) )
),
2022-12-05 18:23:12 +01:00
'default'
);
?>
</p>
2023-06-28 14:22:27 +02:00
<?php endif; ?>
<h3><?php \esc_html_e( 'Troubleshooting', 'activitypub' ); ?></h3>
2022-12-02 18:23:56 +01:00
<p>
<?php
2022-12-05 18:23:12 +01:00
echo wp_kses(
2022-12-02 20:44:56 +01:00
\sprintf(
2022-12-05 18:23:12 +01:00
// translators:
\__(
'If you have problems using this plugin, please check the <a href="%s">Site Health</a> to ensure that your site is compatible and/or use the "Help" tab (in the top right of the settings pages).',
'activitypub'
),
2022-12-05 18:37:12 +01:00
\esc_url_raw( admin_url( 'site-health.php' ) )
2022-12-02 20:44:56 +01:00
),
2022-12-05 18:23:12 +01:00
'default'
2022-12-02 18:23:56 +01:00
);
?>
</p>
2023-05-05 13:58:17 +02:00
<?php if ( ACTIVITYPUB_SHOW_PLUGIN_RECOMMENDATIONS ) : ?>
<hr />
2022-12-02 18:23:56 +01:00
2022-12-05 17:45:56 +01:00
<h3><?php \esc_html_e( 'Recommended Plugins', 'activitypub' ); ?></h3>
2022-12-02 18:23:56 +01:00
2022-12-05 17:45:56 +01:00
<p><?php \esc_html_e( 'ActivityPub works as is and there is no need for you to install additional plugins, nevertheless there are some plugins that extends the functionality of ActivityPub.', 'activitypub' ); ?></p>
2022-12-02 18:23:56 +01:00
<div class="activitypub-settings-accordion">
2023-05-23 13:44:08 +02:00
<?php if ( ! \defined( 'FRIENDS_VERSION' ) ) : ?>
2022-12-02 18:23:56 +01:00
<h4 class="activitypub-settings-accordion-heading">
<button aria-expanded="true" class="activitypub-settings-accordion-trigger" aria-controls="activitypub-settings-accordion-block-friends-plugin" type="button">
<span class="title"><?php \esc_html_e( 'Following Others', 'activitypub' ); ?></span>
2022-12-02 18:23:56 +01:00
<span class="icon"></span>
</button>
</h4>
<div id="activitypub-settings-accordion-block-friends-plugin" class="activitypub-settings-accordion-panel plugin-card-friends">
2022-12-02 18:23:56 +01:00
<p><?php \esc_html_e( 'To follow people on Mastodon or similar platforms using your own WordPress, you can use the Friends Plugin for WordPress which uses this plugin to receive posts and display them on your own WordPress, thus making your own WordPress a Fediverse instance of its own.', 'activitypub' ); ?></p>
2023-05-23 13:44:08 +02:00
<p><a href="<?php echo \esc_url_raw( \admin_url( 'plugin-install.php?tab=plugin-information&plugin=friends&TB_iframe=true' ) ); ?>" class="thickbox open-plugin-details-modal button install-now" target="_blank"><?php \esc_html_e( 'Install the Friends Plugin', 'activitypub' ); ?></a></p>
2022-12-02 18:23:56 +01:00
</div>
2023-05-23 13:44:08 +02:00
<?php endif; ?>
<?php if ( ! \class_exists( 'Hum' ) ) : ?>
2022-12-02 18:23:56 +01:00
<h4 class="activitypub-settings-accordion-heading">
<button aria-expanded="false" class="activitypub-settings-accordion-trigger" aria-controls="activitypub-settings-accordion-block-activitypub-hum-plugin" type="button">
<span class="title"><?php \esc_html_e( 'Add a URL Shortener', 'activitypub' ); ?></span>
2022-12-02 18:23:56 +01:00
<span class="icon"></span>
</button>
</h4>
2022-12-05 21:30:11 +01:00
<div id="activitypub-settings-accordion-block-activitypub-hum-plugin" class="activitypub-settings-accordion-panel plugin-card-hum" hidden="hidden">
2022-12-02 18:23:56 +01:00
<p><?php \esc_html_e( 'Hum is a personal URL shortener for WordPress, designed to provide short URLs to your personal content, both hosted on WordPress and elsewhere.', 'activitypub' ); ?></p>
2023-05-23 13:44:08 +02:00
<p><a href="<?php echo \esc_url_raw( \admin_url( 'plugin-install.php?tab=plugin-information&plugin=hum&TB_iframe=true' ) ); ?>" class="thickbox open-plugin-details-modal button install-now" target="_blank"><?php \esc_html_e( 'Install the Hum Plugin', 'activitypub' ); ?></a></p>
2022-12-02 18:23:56 +01:00
</div>
2023-05-23 13:44:08 +02:00
<?php endif; ?>
<?php if ( ! \class_exists( 'Webfinger' ) ) : ?>
2022-12-02 18:23:56 +01:00
<h4 class="activitypub-settings-accordion-heading">
<button aria-expanded="false" class="activitypub-settings-accordion-trigger" aria-controls="activitypub-settings-accordion-block-activitypub-webfinger-plugin" type="button">
2022-12-05 17:49:08 +01:00
<span class="title"><?php \esc_html_e( 'Advanced WebFinger Support', 'activitypub' ); ?></span>
2022-12-02 18:23:56 +01:00
<span class="icon"></span>
</button>
</h4>
2022-12-05 21:30:11 +01:00
<div id="activitypub-settings-accordion-block-activitypub-webfinger-plugin" class="activitypub-settings-accordion-panel plugin-card-webfinger" hidden="hidden">
2022-12-02 18:23:56 +01:00
<p><?php \esc_html_e( 'WebFinger is a protocol that allows for discovery of information about people and things identified by a URI. Information about a person might be discovered via an "acct:" URI, for example, which is a URI that looks like an email address.', 'activitypub' ); ?></p>
<p><?php \esc_html_e( 'The ActivityPub plugin comes with basic WebFinger support, if you need more configuration options and compatibility with other Fediverse/IndieWeb plugins, please install the WebFinger plugin.', 'activitypub' ); ?></p>
2023-05-23 13:44:08 +02:00
<p><a href="<?php echo \esc_url_raw( \admin_url( 'plugin-install.php?tab=plugin-information&plugin=webfinger&TB_iframe=true' ) ); ?>" class="thickbox open-plugin-details-modal button install-now" target="_blank"><?php \esc_html_e( 'Install the WebFinger Plugin', 'activitypub' ); ?></a></p>
2022-12-02 18:23:56 +01:00
</div>
2023-05-23 13:44:08 +02:00
<?php endif; ?>
<?php if ( ! \function_exists( 'nodeinfo_init' ) ) : ?>
2022-12-02 18:23:56 +01:00
<h4 class="activitypub-settings-accordion-heading">
<button aria-expanded="false" class="activitypub-settings-accordion-trigger" aria-controls="activitypub-settings-accordion-block-activitypub-nodeinfo-plugin" type="button">
<span class="title"><?php \esc_html_e( 'Provide Enhanced Information about Your Blog', 'activitypub' ); ?></span>
2022-12-02 18:23:56 +01:00
<span class="icon"></span>
</button>
</h4>
2022-12-05 21:30:11 +01:00
<div id="activitypub-settings-accordion-block-activitypub-nodeinfo-plugin" class="activitypub-settings-accordion-panel plugin-card-nodeinfo" hidden="hidden">
2022-12-02 18:23:56 +01:00
<p><?php \esc_html_e( 'NodeInfo is an effort to create a standardized way of exposing metadata about a server running one of the distributed social networks. The two key goals are being able to get better insights into the user base of distributed social networking and the ability to build tools that allow users to choose the best fitting software and server for their needs.', 'activitypub' ); ?></p>
<p><?php \esc_html_e( 'The ActivityPub plugin comes with a simple NodeInfo endpoint. If you need more configuration options and compatibility with other Fediverse plugins, please install the NodeInfo plugin.', 'activitypub' ); ?></p>
2023-05-23 13:44:08 +02:00
<p><a href="<?php echo \esc_url_raw( \admin_url( 'plugin-install.php?tab=plugin-information&plugin=nodeinfo&TB_iframe=true' ) ); ?>" class="thickbox open-plugin-details-modal button install-now" target="_blank"><?php \esc_html_e( 'Install the NodeInfo Plugin', 'activitypub' ); ?></a></p>
2022-12-02 18:23:56 +01:00
</div>
2023-05-23 13:44:08 +02:00
<?php endif; ?>
2022-12-02 18:23:56 +01:00
</div>
2023-05-05 13:58:17 +02:00
<?php endif; ?>
</div>