diff --git a/.editorconfig b/.editorconfig
index 79207a40c..ceb407da4 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -19,4 +19,4 @@ indent_style = space
indent_size = 2
[{*.txt,wp-config-sample.php}]
-end_of_line = crlf
+end_of_line = lf
diff --git a/README.md b/README.md
index cbb25f210..ba7b6cc84 100644
--- a/README.md
+++ b/README.md
@@ -55,6 +55,12 @@ To implement:
Project maintained on github at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub).
+### 0.4.0 ###
+
+* added settings to enable/disable hashtag support
+* fixed follower list
+* send activities only for new posts, otherwise send updates
+
### 0.3.2 ###
* added "followers" endpoint
diff --git a/activitypub.php b/activitypub.php
index 5ba34e17b..aef484503 100644
--- a/activitypub.php
+++ b/activitypub.php
@@ -3,7 +3,7 @@
* Plugin Name: ActivityPub
* Plugin URI: https://github.com/pfefferle/wordpress-activitypub/
* Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.
- * Version: 0.3.2
+ * Version: 0.4.0
* Author: Matthias Pfefferle
* Author URI: https://notiz.blog/
* License: MIT
@@ -70,9 +70,11 @@ function activitypub_init() {
add_action( 'admin_init', array( 'Activitypub_Admin', 'register_settings' ) );
add_action( 'show_user_profile', array( 'Activitypub_Admin', 'add_fediverse_profile' ) );
- require_once dirname( __FILE__ ) . '/includes/class-activitypub-hashtag.php';
- add_filter( 'wp_insert_post', array( 'Activitypub_Hashtag', 'insert_post' ), 99, 2 );
- add_filter( 'the_content', array( 'Activitypub_Hashtag', 'the_content' ), 99, 2 );
+ if ( '1' === get_option( 'activitypub_use_hashtags', '1' ) ) {
+ require_once dirname( __FILE__ ) . '/includes/class-activitypub-hashtag.php';
+ add_filter( 'wp_insert_post', array( 'Activitypub_Hashtag', 'insert_post' ), 99, 2 );
+ add_filter( 'the_content', array( 'Activitypub_Hashtag', 'the_content' ), 99, 2 );
+ }
}
add_action( 'plugins_loaded', 'activitypub_init' );
diff --git a/includes/class-activitypub-admin.php b/includes/class-activitypub-admin.php
index 499176cb7..12319204d 100644
--- a/includes/class-activitypub-admin.php
+++ b/includes/class-activitypub-admin.php
@@ -60,6 +60,13 @@ public static function register_settings() {
'default' => 0,
)
);
+ register_setting(
+ 'activitypub', 'activitypub_use_hashtags', array(
+ 'type' => 'boolean',
+ 'description' => __( 'Use the Shortlink instead of the permalink', 'activitypub' ),
+ 'default' => 0,
+ )
+ );
}
public static function add_help_tab() {
diff --git a/languages/activitypub.pot b/languages/activitypub.pot
index a536a12b2..4a41ab4c7 100644
--- a/languages/activitypub.pot
+++ b/languages/activitypub.pot
@@ -2,9 +2,9 @@
# This file is distributed under the MIT.
msgid ""
msgstr ""
-"Project-Id-Version: ActivityPub 0.3.2\n"
+"Project-Id-Version: ActivityPub 0.4.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/activitypub\n"
-"POT-Creation-Date: 2019-02-04 12:33:44+00:00\n"
+"POT-Creation-Date: 2019-02-17 20:26:22+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -21,15 +21,16 @@ msgstr ""
msgid "The Activity-Object-Type"
msgstr ""
-#: includes/class-activitypub-admin.php:59 templates/settings-page.php:34
+#: includes/class-activitypub-admin.php:59
+#: includes/class-activitypub-admin.php:66 templates/settings-page.php:33
msgid "Use the Shortlink instead of the permalink"
msgstr ""
-#: includes/class-activitypub-admin.php:69
+#: includes/class-activitypub-admin.php:76
msgid "Overview"
msgstr ""
-#: includes/class-activitypub-admin.php:71
+#: includes/class-activitypub-admin.php:78
msgid ""
"ActivityPub is a decentralized social networking protocol based on the "
"ActivityStreams 2.0 data format. ActivityPub is an official W3C recommended "
@@ -39,33 +40,33 @@ msgid ""
"subscribing to content."
msgstr ""
-#: includes/class-activitypub-admin.php:76
+#: includes/class-activitypub-admin.php:83
msgid "For more information:"
msgstr ""
-#: includes/class-activitypub-admin.php:77
+#: includes/class-activitypub-admin.php:84
msgid "Test Suite"
msgstr ""
-#: includes/class-activitypub-admin.php:78
+#: includes/class-activitypub-admin.php:85
msgid "W3C Spec"
msgstr ""
-#: includes/class-activitypub-admin.php:79
+#: includes/class-activitypub-admin.php:86
msgid ""
"Give "
"us feedback"
msgstr ""
-#: includes/class-activitypub-admin.php:81
+#: includes/class-activitypub-admin.php:88
msgid "Donate"
msgstr ""
-#: includes/class-activitypub-admin.php:87
+#: includes/class-activitypub-admin.php:94
msgid "Fediverse"
msgstr ""
-#: includes/class-db-activitypub-followers.php:23
+#: includes/class-db-activitypub-followers.php:46
msgid "Unknown Actor schema"
msgstr ""
@@ -128,7 +129,7 @@ msgstr ""
msgid "Blog"
msgstr ""
-#: templates/json-author.php:59 templates/settings-page.php:60
+#: templates/json-author.php:59 templates/settings-page.php:79
msgid "Profile"
msgstr ""
@@ -179,57 +180,75 @@ msgstr ""
msgid "Backlink"
msgstr ""
-#: templates/settings-page.php:41
+#: templates/settings-page.php:39
msgid "Activtity-Object-Type"
msgstr ""
-#: templates/settings-page.php:45
+#: templates/settings-page.php:43
msgid "Note (default)"
msgstr ""
-#: templates/settings-page.php:45
+#: templates/settings-page.php:43
msgid "Should work with most plattforms."
msgstr ""
-#: templates/settings-page.php:48
+#: templates/settings-page.php:46
msgid "Article"
msgstr ""
-#: templates/settings-page.php:48
+#: templates/settings-page.php:46
msgid ""
"The presentation of the \"Article\" might change on different plattforms. "
"Mastodon for example shows the \"Article\" type as a simple link."
msgstr ""
-#: templates/settings-page.php:51
+#: templates/settings-page.php:49
msgid "WordPress Post-Format"
msgstr ""
-#: templates/settings-page.php:51
+#: templates/settings-page.php:49
msgid "Maps the WordPress Post-Format to the ActivityPub Object Type."
msgstr ""
-#: templates/settings-page.php:62
+#: templates/settings-page.php:58
+msgid "Hashtag"
+msgstr ""
+
+#: templates/settings-page.php:60
+msgid "All #tag related settings"
+msgstr ""
+
+#: templates/settings-page.php:66
+msgid "Support Hashtags"
+msgstr ""
+
+#: templates/settings-page.php:70
+msgid ""
+"Add hashtags in the content as native tags and replace the "
+"#tag
with the tag-link."
+msgstr ""
+
+#: templates/settings-page.php:81
msgid "All profile related settings."
msgstr ""
-#: templates/settings-page.php:68
+#: templates/settings-page.php:87
msgid "Followers"
msgstr ""
-#: templates/settings-page.php:70
+#: templates/settings-page.php:89
msgid "All follower related settings."
msgstr ""
-#: templates/settings-page.php:76
+#: templates/settings-page.php:95
msgid "List of followers"
msgstr ""
-#: templates/settings-page.php:86
+#: templates/settings-page.php:105
msgid "No followers yet"
msgstr ""
-#: templates/settings-page.php:101
+#: templates/settings-page.php:120
msgid ""
"If you like this plugin, what about a small donation?"
diff --git a/readme.txt b/readme.txt
index 42760d856..4d781aa9d 100644
--- a/readme.txt
+++ b/readme.txt
@@ -55,6 +55,12 @@ To implement:
Project maintained on github at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub).
+= 0.4.0 =
+
+* added settings to enable/disable hashtag support
+* fixed follower list
+* send activities only for new posts, otherwise send updates
+
= 0.3.2 =
* added "followers" endpoint
diff --git a/templates/settings-page.php b/templates/settings-page.php
index 02ade9754..03d165a54 100644
--- a/templates/settings-page.php
+++ b/templates/settings-page.php
@@ -30,10 +30,8 @@
- -
', '' ); ?>
- + +', '' ); ?>
+ + | +
+ + + + |
+
---|