Skip to content

Commit 0ac4bb0

Browse files
committed
fix inconsistent %tags% placeholder
1 parent 627100b commit 0ac4bb0

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
**Tags:** OStatus, fediverse, activitypub, activitystream
55
**Requires at least:** 4.7
66
**Tested up to:** 5.6
7-
**Stable tag:** 0.11.1
7+
**Stable tag:** 0.11.2
88
**Requires PHP:** 5.6
99
**License:** MIT
1010
**License URI:** http://opensource.org/licenses/MIT
@@ -88,6 +88,10 @@ Where 'blog' is the path to the subdirectory at which your blog resides.
8888

8989
Project maintained on GitHub at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub).
9090

91+
### 0.11.2 ###
92+
93+
* fix inconsistent `%tags%` placeholder
94+
9195
### 0.11.1 ###
9296

9397
* fix follow/unfollow actions

activitypub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: ActivityPub
44
* Plugin URI: https://github.com/pfefferle/wordpress-activitypub/
55
* Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.
6-
* Version: 0.11.1
6+
* Version: 0.11.2
77
* Author: Matthias Pfefferle
88
* Author URI: https://notiz.blog/
99
* License: MIT

includes/model/class-post.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ public function generate_the_content() {
228228
$content = \str_replace( '%permalink%', $this->get_the_post_link( 'permalink' ), $content );
229229
$content = \str_replace( '%shortlink%', $this->get_the_post_link( 'shortlink' ), $content );
230230
$content = \str_replace( '%hashtags%', $this->get_the_post_hashtags(), $content );
231+
// backwards compatibility
232+
$content = \str_replace( '%tags%', $this->get_the_post_hashtags(), $content );
231233

232234
$content = \trim( \preg_replace( '/[\r\n]{2,}/', '', $content ) );
233235

@@ -253,7 +255,7 @@ public function get_post_content_template() {
253255
}
254256

255257
if ( 'content' === \get_option( 'activitypub_post_content_type', 'content' ) ) {
256-
return "%content%\n\n<p>%tags%</p>\n\n<p>%permalink%</p>";
258+
return "%content%\n\n<p>%hashtags%</p>\n\n<p>%permalink%</p>";
257259
}
258260

259261
return \get_option( 'activitypub_custom_post_content', ACTIVITYPUB_CUSTOM_POST_CONTENT );

languages/activitypub.pot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# This file is distributed under the MIT.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: ActivityPub 0.11.1\n"
5+
"Project-Id-Version: ActivityPub 0.11.2\n"
66
"Report-Msgid-Bugs-To: "
77
"https://wordpress.org/support/plugin/wordpress-activitypub\n"
8-
"POT-Creation-Date: 2020-12-17 20:15:15+00:00\n"
8+
"POT-Creation-Date: 2020-12-17 21:20:55+00:00\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=utf-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"

readme.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Donate link: https://notiz.blog/donate/
44
Tags: OStatus, fediverse, activitypub, activitystream
55
Requires at least: 4.7
66
Tested up to: 5.6
7-
Stable tag: 0.11.1
7+
Stable tag: 0.11.2
88
Requires PHP: 5.6
99
License: MIT
1010
License URI: http://opensource.org/licenses/MIT
@@ -88,6 +88,10 @@ Where 'blog' is the path to the subdirectory at which your blog resides.
8888

8989
Project maintained on GitHub at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub).
9090

91+
= 0.11.2 =
92+
93+
* fix inconsistent `%tags%` placeholder
94+
9195
= 0.11.1 =
9296

9397
* fix follow/unfollow actions

0 commit comments

Comments
 (0)