From 94ba1666f27e2d2253579251a0997dd3ee1b80f3 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Wed, 20 Feb 2019 20:25:19 +0100 Subject: [PATCH] finally fixed backlink in excerpt/summary posts --- README.md | 6 +++++- activitypub.php | 2 +- includes/class-activitypub-post.php | 6 ++++-- readme.txt | 6 +++++- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5cb7e5c..d0896c8 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.1 -**Stable tag:** 0.4.2 +**Stable tag:** 0.4.3 **Requires PHP:** 5.6 **License:** MIT **License URI:** http://opensource.org/licenses/MIT @@ -55,6 +55,10 @@ To implement: Project maintained on github at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub). +### 0.4.3 ### + +* finally fixed backlink in excerpt/summary posts + ### 0.4.2 ### * fixed backlink in excerpt/summary posts (thanks @depone) diff --git a/activitypub.php b/activitypub.php index fb3eda4..42a7b37 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.4.2 + * Version: 0.4.3 * Author: Matthias Pfefferle * Author URI: https://notiz.blog/ * License: MIT diff --git a/includes/class-activitypub-post.php b/includes/class-activitypub-post.php index 9c67158..be32928 100644 --- a/includes/class-activitypub-post.php +++ b/includes/class-activitypub-post.php @@ -204,7 +204,9 @@ class Activitypub_Post { public function get_the_summary() { if ( 'Article' === $this->get_object_type() ) { - return $this->get_the_post_excerpt( 400 ); + $excerpt = $this->get_the_post_excerpt( 400 ); + + return html_entity_decode( $excerpt, ENT_QUOTES, 'UTF-8' ); } return null; @@ -244,7 +246,7 @@ class Activitypub_Post { } } - return html_entity_decode( $excerpt, ENT_QUOTES, 'UTF-8' ); + return $excerpt; } /** diff --git a/readme.txt b/readme.txt index b5103a0..0a86bc7 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.1 -Stable tag: 0.4.2 +Stable tag: 0.4.3 Requires PHP: 5.6 License: MIT License URI: http://opensource.org/licenses/MIT @@ -55,6 +55,10 @@ To implement: Project maintained on github at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub). += 0.4.3 = + +* finally fixed backlink in excerpt/summary posts + = 0.4.2 = * fixed backlink in excerpt/summary posts (thanks @depone)