' . \__( 'ActivityPub is a decentralized social networking protocol based on the ActivityStreams 2.0 data format. ActivityPub is an official W3C recommended standard published by the W3C Social Web Working Group. It provides a client to server API for creating, updating and deleting content, as well as a federated server to server API for delivering notifications and subscribing to content.', 'activitypub' ) . '
' . \__( 'What is the Fediverse?', 'activitypub' ) . '
' .
+ '
' . \__( 'The Fediverse is a new word made of two words: "federation" + "universe"', 'activitypub' ) . '
' .
+ '
' . \__( 'It is a federated social network running on free open software on a myriad of computers across the globe. Many independent servers are interconnected and allow people to interact with one another. There\'s no one central site: you choose a server to register. This ensures some decentralization and sovereignty of data. Fediverse (also called Fedi) has no built-in advertisements, no tricky algorithms, no one big corporation dictating the rules. Instead we have small cozy communities of like-minded people. Welcome!', 'activitypub' ) . '
' . \__( 'What is ActivityPub?', 'activitypub' ) . '
' .
+ '
' . \__( 'ActivityPub is a decentralized social networking protocol based on the ActivityStreams 2.0 data format. ActivityPub is an official W3C recommended standard published by the W3C Social Web Working Group. It provides a client to server API for creating, updating and deleting content, as well as a federated server to server API for delivering notifications and subscribing to content.', 'activitypub' ) . '
' . \__( 'What is WebFinger?', 'activitypub' ) . '
' .
+ '
' . \__( 'WebFinger is used to discover information about people or other entities on the Internet that are identified by a URI using standard Hypertext Transfer Protocol (HTTP) methods over a secure transport. A WebFinger resource returns a JavaScript Object Notation (JSON) object describing the entity that is queried. The JSON object is referred to as the JSON Resource Descriptor (JRD).', 'activitypub' ) . '
' .
+ '
' . \__( 'For a person, the type of information that might be discoverable via WebFinger includes a personal profile address, identity service, telephone number, or preferred avatar. For other entities on the Internet, a WebFinger resource might return JRDs containing link relations that enable a client to discover, for example, that a printer can print in color on A4 paper, the physical location of a server, or other static information.', 'activitypub' ) . '
' .
+ '
' . \__( 'On Mastodon [and other Plattforms], user profiles can be hosted either locally on the same website as yours, or remotely on a completely different website. The same username may be used on a different domain. Therefore, a Mastodon user\'s full mention consists of both the username and the domain, in the form @username@domain. In practical terms, @user@example.com is not the same as @user@example.org. If the domain is not included, Mastodon will try to find a local user named @username. However, in order to deliver to someone over ActivityPub, the @username@domain mention is not enough – mentions must be translated to an HTTPS URI first, so that the remote actor\'s inbox and outbox can be found. (This paragraph is copied from the Mastodon Documentation)', 'activitypub' ) . '
' . \__( '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' ) . '
+ %s or the URL %s. Users, that can not access this settings page, will find their username on the Edit Profile page.',
+ 'activitypub'
+ ),
+ \Activitypub\get_webfinger_resource( wp_get_current_user()->ID ),
+ \get_author_posts_url( wp_get_current_user()->ID ),
+ \admin_url( 'profile.php#fediverse' )
+ );
+ ?>
+
+
Site Health to ensure that your site is compatible and/or use the "Help" tab (in the top right of the settings pages).', 'activitypub' ), admin_url( '/wp-admin/site-health.php' ) ); ?>
+
+
Friends Plugin for WordPress which uses this plugin to receive posts and display them on your own WordPress, thus making your own WordPress a Mastodon instance of its own.', 'activitypub' ); ?>
+
From 0a1e5c13f35cc6f736b67585b47d1864c48a56dc Mon Sep 17 00:00:00 2001
From: Matthias Pfefferle
Date: Tue, 15 Nov 2022 18:24:14 +0100
Subject: [PATCH 02/46] fix phpcs issue
---
includes/class-admin.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/includes/class-admin.php b/includes/class-admin.php
index dd00350..8637f1e 100644
--- a/includes/class-admin.php
+++ b/includes/class-admin.php
@@ -155,6 +155,6 @@ class Admin {
}
public static function admin_style() {
- wp_enqueue_style( 'admin-styles', plugin_dir_url( __FILE__ ) . '../assets/css/admin.css' );
+ wp_enqueue_style( 'admin-styles', plugin_dir_url( __FILE__ ) . '../assets/css/admin.css', array(), '1.0.0' );
}
}
From a280680e5d386b991f041840403d7430093543a5 Mon Sep 17 00:00:00 2001
From: Matthias Pfefferle
Date: Tue, 15 Nov 2022 20:30:40 +0100
Subject: [PATCH 03/46] Update templates/welcome.php
Co-authored-by: Alex Kirk
---
templates/welcome.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/welcome.php b/templates/welcome.php
index ffff3e2..8ed5e16 100644
--- a/templates/welcome.php
+++ b/templates/welcome.php
@@ -8,7 +8,7 @@
%s or the URL %s. Users, that can not access this settings page, will find their username on the Edit Profile page.',
+ 'People can follow you by using the username %s or the URL %s. Users who can not access this settings page will find their username on the Edit Profile page.',
'activitypub'
),
\Activitypub\get_webfinger_resource( wp_get_current_user()->ID ),
From 9de398df4eec73485057c360d3f87a21dae6dd8f Mon Sep 17 00:00:00 2001
From: Matthias Pfefferle
Date: Tue, 15 Nov 2022 20:33:37 +0100
Subject: [PATCH 04/46] remove misleading part
---
templates/welcome.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/welcome.php b/templates/welcome.php
index 8ed5e16..172e3e5 100644
--- a/templates/welcome.php
+++ b/templates/welcome.php
@@ -19,5 +19,5 @@
Site Health to ensure that your site is compatible and/or use the "Help" tab (in the top right of the settings pages).', 'activitypub' ), admin_url( '/wp-admin/site-health.php' ) ); ?>
-
Friends Plugin for WordPress which uses this plugin to receive posts and display them on your own WordPress, thus making your own WordPress a Mastodon instance of its own.', 'activitypub' ); ?>
+
Friends Plugin for WordPress which uses this plugin to receive posts and display them on your own WordPress.', 'activitypub' ); ?>
From 7f346baf691d15f63a3897febc08c37d70fde673 Mon Sep 17 00:00:00 2001
From: Matthias Pfefferle
Date: Tue, 15 Nov 2022 20:37:18 +0100
Subject: [PATCH 05/46] remove spec and test links
and replace them with support and bug links
---
includes/help.php | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/includes/help.php b/includes/help.php
index 632b189..16ffbea 100644
--- a/includes/help.php
+++ b/includes/help.php
@@ -48,9 +48,8 @@
\get_current_screen()->set_help_sidebar(
'
' . \__( 'For more information:', 'activitypub' ) . '
Site Health to ensure that your site is compatible and/or use the "Help" tab (in the top right of the settings pages).', 'activitypub' ), admin_url( '/wp-admin/site-health.php' ) ); ?>
Site Health to ensure that your site is compatible and/or use the "Help" tab (in the top right of the settings pages).', 'activitypub' ), admin_url( '/wp-admin/site-health.php' ) ); ?>
%s or the URL %s. Users who can not access this settings page will find their username on the Edit Profile page.',
+ // translators:
+ \esc_html__(
+ 'People can follow you by using the username %1$s or the URL %2$s. Users who can not access this settings page will find their username on the %3$sEdit Profile%4$s page.',
'activitypub'
),
- \esc_attr( \Activitypub\get_webfinger_resource( wp_get_current_user()->ID ) ),
- \esc_url_raw( \get_author_posts_url( wp_get_current_user()->ID ) ),
- \esc_url_raw( \admin_url( 'profile.php#activitypub' ) )
+ \sprintf(
+ '%s',
+ \esc_attr( \Activitypub\get_webfinger_resource( wp_get_current_user()->ID ) )
+ ),
+ \sprintf(
+ '%s',
+ \esc_url_raw( \get_author_posts_url( wp_get_current_user()->ID ) )
+ ),
+ \sprintf(
+ '',
+ \esc_url_raw( \admin_url( 'profile.php#activitypub' ) )
+ ),
+ ''
);
?>
Site Health to ensure that your site is compatible and/or use the "Help" tab (in the top right of the settings pages).', 'activitypub' ),
- \esc_url_raw( admin_url( '/wp-admin/site-health.php' ) )
+ // translators:
+ \esc_html__( 'If you have problems using this plugin, please check the %1$sSite Health%2$s to ensure that your site is compatible and/or use the "Help" tab (in the top right of the settings pages).', 'activitypub' ),
+ \sprintf(
+ '',
+ \esc_url_raw( admin_url( '/wp-admin/site-health.php' ) )
+ ),
+ ''
);
?>
',
+ // translators:
+ \__( 'If you have problems using this plugin, please check the Site Health to ensure that your site is compatible and/or use the "Help" tab (in the top right of the settings pages).', 'activitypub' ),
\esc_url_raw( admin_url( '/wp-admin/site-health.php' ) )
),
- ''
+ 'default'
);
?>
',
- \esc_url_raw( \admin_url( '/wp-admin/site-health.php' ) )
+ // translators:
+ \__( 'If you have problems using this plugin, please check the Site Health to ensure that your site is compatible and/or use the "Help" tab (in the top right of the settings pages).', 'activitypub' ),
+ \esc_url_raw( \admin_url( 'site-health.php' ) )
),
- ''
+ 'default'
);
?>
@@ -55,7 +54,7 @@
-
-
+
@@ -65,14 +64,14 @@
%excerpt% -
%permalink% -
-
%shortlink% - ', '' ); ?>
+
%shortlink% - Hum, to prettify the Shortlinks', 'activitypub' ), 'default' ); ?>
%hashtags% -
-
', '' ); ?>
+
Let me know if you miss a template pattern.', 'activitypub' ), 'default' ); ?>
@@ -117,7 +116,7 @@
-
+
@@ -162,7 +161,7 @@
Disallowed Comment Keys" list.', 'activitypub' ),
\esc_attr( \admin_url( 'options-discussion.php#disallowed_keys' ) )
diff --git a/templates/welcome.php b/templates/welcome.php
index 28987f9..75387fd 100644
--- a/templates/welcome.php
+++ b/templates/welcome.php
@@ -36,7 +36,7 @@
\sprintf(
// translators:
\__( 'If you have problems using this plugin, please check the Site Health to ensure that your site is compatible and/or use the "Help" tab (in the top right of the settings pages).', 'activitypub' ),
- \esc_url_raw( admin_url( '/wp-admin/site-health.php' ) )
+ \esc_url_raw( admin_url( 'site-health.php' ) )
),
'default'
);
From 59117ba953dceb2225c971272b1779200fe5bd9d Mon Sep 17 00:00:00 2001
From: Matthias Pfefferle
Date: Mon, 5 Dec 2022 20:26:37 +0100
Subject: [PATCH 31/46] nicer info header
---
assets/css/activitypub-admin.css | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/assets/css/activitypub-admin.css b/assets/css/activitypub-admin.css
index 695a5f0..946bf13 100644
--- a/assets/css/activitypub-admin.css
+++ b/assets/css/activitypub-admin.css
@@ -1,3 +1,8 @@
+.settings_page_activitypub-settings .notice-info {
+ max-width: 800px;
+ margin: 0 auto;
+}
+
.activitypub-settings-header {
text-align: center;
margin: 0 0 1rem;
From 0cbc1037acb9e1be4909a351476f6d259d439712 Mon Sep 17 00:00:00 2001
From: Matthias Pfefferle
Date: Mon, 5 Dec 2022 20:26:49 +0100
Subject: [PATCH 32/46] better escaping
---
templates/settings.php | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/templates/settings.php b/templates/settings.php
index 5f8fddb..51e4520 100644
--- a/templates/settings.php
+++ b/templates/settings.php
@@ -128,15 +128,13 @@
',
- '',
+ echo \wp_kses(
\sprintf(
- '%s',
+ // translators:
+ \__( 'A list of HTML elements, you want to whitelist for your activities. Leave list empty to support all HTML elements. Default: %s', 'activitypub' ),
\esc_html( ACTIVITYPUB_ALLOWED_HTML )
- )
+ ),
+ 'default'
);
?>
@@ -131,7 +131,7 @@
echo \wp_kses(
\sprintf(
// translators:
- \__( 'A list of HTML elements, you want to whitelist for your activities. Leave list empty to support all HTML elements. Default: %s', 'activitypub' ),
+ \__( 'A list of HTML elements, you want to allowlist for your activities. Leave list empty to support all HTML elements. Default: %s', 'activitypub' ),
\esc_html( ACTIVITYPUB_ALLOWED_HTML )
),
'default'
From 5bfbe2e6f0bfeeb67f6053baedbbf92f9979b31a Mon Sep 17 00:00:00 2001
From: Matthias Pfefferle
Date: Mon, 5 Dec 2022 21:05:43 +0100
Subject: [PATCH 37/46] Update templates/welcome.php
Co-authored-by: Alex Kirk
---
templates/welcome.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/welcome.php b/templates/welcome.php
index 8f82413..5168639 100644
--- a/templates/welcome.php
+++ b/templates/welcome.php
@@ -56,7 +56,7 @@
-