From 15cff15bc1f8235d0b9c1d9890b320e1798d3859 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Mon, 9 Sep 2024 10:05:18 +0200 Subject: [PATCH] Fixed: Content handling for Podcasts (#883) --- CHANGELOG.md | 7 +++++++ README.md | 6 +++++- activitypub.php | 4 ++-- integration/class-seriously-simple-podcasting.php | 13 +++++++++++++ readme.txt | 6 +++++- 5 files changed, 32 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbd3557b..f602a586 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.2.1] - 2024-09-09 + +### Fixed + +* Fixed: Use `Excerpt` for Podcast Episodes + ## [3.2.0] - 2024-09-09 ### Added @@ -885,6 +891,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * initial +[3.2.1]: https://github.com/Automattic/wordpress-activitypub/compare/3.2.0...3.2.1 [3.2.0]: https://github.com/Automattic/wordpress-activitypub/compare/3.1.0...3.2.0 [3.1.0]: https://github.com/Automattic/wordpress-activitypub/compare/3.0.0...3.1.0 [3.0.0]: https://github.com/Automattic/wordpress-activitypub/compare/2.6.1...3.0.0 diff --git a/README.md b/README.md index 7ad79144..afebb221 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ **Tags:** OStatus, fediverse, activitypub, activitystream **Requires at least:** 5.5 **Tested up to:** 6.6 -**Stable tag:** 3.2.0 +**Stable tag:** 3.2.1 **Requires PHP:** 7.0 **License:** MIT **License URI:** http://opensource.org/licenses/MIT @@ -134,6 +134,10 @@ For reasons of data protection, it is not possible to see the followers of other ## Changelog ## +### 3.2.1 ### + +* Fixed: Use `Excerpt` for Podcast Episodes + ### 3.2.0 ### * Added: Support for Seriously Simple Podcasting diff --git a/activitypub.php b/activitypub.php index bc6b197b..93d30d59 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: 3.2.0 + * Version: 3.2.1 * Author: Matthias Pfefferle & Automattic * Author URI: https://automattic.com/ * License: MIT @@ -21,7 +21,7 @@ require_once __DIR__ . '/includes/compat.php'; require_once __DIR__ . '/includes/functions.php'; -\define( 'ACTIVITYPUB_PLUGIN_VERSION', '3.2.0' ); +\define( 'ACTIVITYPUB_PLUGIN_VERSION', '3.2.1' ); /** * Initialize the plugin constants. diff --git a/integration/class-seriously-simple-podcasting.php b/integration/class-seriously-simple-podcasting.php index 8f9f96cb..1a5ccbe8 100644 --- a/integration/class-seriously-simple-podcasting.php +++ b/integration/class-seriously-simple-podcasting.php @@ -3,6 +3,8 @@ use Activitypub\Transformer\Post; +use function Activitypub\generate_post_summary; + /** * Compatibility with the Seriously Simple Podcasting plugin. * @@ -46,4 +48,15 @@ public function get_attachment() { public function get_type() { return 'Note'; } + + /** + * Returns the content for the ActivityPub Item. + * + * The content will be generated based on the user settings. + * + * @return string The content. + */ + public function get_content() { + return generate_post_summary( $this->wp_object ); + } } diff --git a/readme.txt b/readme.txt index 08837cf6..d5f59d75 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: automattic, pfefferle, mediaformat, mattwiebe, akirk, jeherve, nur Tags: OStatus, fediverse, activitypub, activitystream Requires at least: 5.5 Tested up to: 6.6 -Stable tag: 3.2.0 +Stable tag: 3.2.1 Requires PHP: 7.0 License: MIT License URI: http://opensource.org/licenses/MIT @@ -134,6 +134,10 @@ For reasons of data protection, it is not possible to see the followers of other == Changelog == += 3.2.1 = + +* Fixed: Use `Excerpt` for Podcast Episodes + = 3.2.0 = * Added: Support for Seriously Simple Podcasting