From 0ac4bb0d8f696f92778d03493cf936c8231352c9 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Thu, 17 Dec 2020 22:21:41 +0100 Subject: [PATCH] fix inconsistent `%tags%` placeholder --- README.md | 6 +++++- activitypub.php | 2 +- includes/model/class-post.php | 4 +++- languages/activitypub.pot | 4 ++-- readme.txt | 6 +++++- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2bbffc7..16a37e4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **Tags:** OStatus, fediverse, activitypub, activitystream **Requires at least:** 4.7 **Tested up to:** 5.6 -**Stable tag:** 0.11.1 +**Stable tag:** 0.11.2 **Requires PHP:** 5.6 **License:** MIT **License URI:** http://opensource.org/licenses/MIT @@ -88,6 +88,10 @@ Where 'blog' is the path to the subdirectory at which your blog resides. Project maintained on GitHub at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub). +### 0.11.2 ### + +* fix inconsistent `%tags%` placeholder + ### 0.11.1 ### * fix follow/unfollow actions diff --git a/activitypub.php b/activitypub.php index 2b47fe5..a791adc 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.11.1 + * Version: 0.11.2 * Author: Matthias Pfefferle * Author URI: https://notiz.blog/ * License: MIT diff --git a/includes/model/class-post.php b/includes/model/class-post.php index ca057b7..33b9411 100644 --- a/includes/model/class-post.php +++ b/includes/model/class-post.php @@ -228,6 +228,8 @@ class Post { $content = \str_replace( '%permalink%', $this->get_the_post_link( 'permalink' ), $content ); $content = \str_replace( '%shortlink%', $this->get_the_post_link( 'shortlink' ), $content ); $content = \str_replace( '%hashtags%', $this->get_the_post_hashtags(), $content ); + // backwards compatibility + $content = \str_replace( '%tags%', $this->get_the_post_hashtags(), $content ); $content = \trim( \preg_replace( '/[\r\n]{2,}/', '', $content ) ); @@ -253,7 +255,7 @@ class Post { } if ( 'content' === \get_option( 'activitypub_post_content_type', 'content' ) ) { - return "%content%\n\n

%tags%

\n\n

%permalink%

"; + return "%content%\n\n

%hashtags%

\n\n

%permalink%

"; } return \get_option( 'activitypub_custom_post_content', ACTIVITYPUB_CUSTOM_POST_CONTENT ); diff --git a/languages/activitypub.pot b/languages/activitypub.pot index a5ae83e..34c3344 100644 --- a/languages/activitypub.pot +++ b/languages/activitypub.pot @@ -2,10 +2,10 @@ # This file is distributed under the MIT. msgid "" msgstr "" -"Project-Id-Version: ActivityPub 0.11.1\n" +"Project-Id-Version: ActivityPub 0.11.2\n" "Report-Msgid-Bugs-To: " "https://wordpress.org/support/plugin/wordpress-activitypub\n" -"POT-Creation-Date: 2020-12-17 20:15:15+00:00\n" +"POT-Creation-Date: 2020-12-17 21:20:55+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/readme.txt b/readme.txt index ef790c5..6eb44fa 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://notiz.blog/donate/ Tags: OStatus, fediverse, activitypub, activitystream Requires at least: 4.7 Tested up to: 5.6 -Stable tag: 0.11.1 +Stable tag: 0.11.2 Requires PHP: 5.6 License: MIT License URI: http://opensource.org/licenses/MIT @@ -88,6 +88,10 @@ Where 'blog' is the path to the subdirectory at which your blog resides. Project maintained on GitHub at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub). += 0.11.2 = + +* fix inconsistent `%tags%` placeholder + = 0.11.1 = * fix follow/unfollow actions