diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c11953c8..c4e45f436 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Improved * Added screen reader text to the "Follow Me" block for improved accessibility +* Added `media_type` support to Activity-Object-Transformers * Clarified settings page text around which users get Activitypub profiles ### Fixed diff --git a/includes/transformer/class-base.php b/includes/transformer/class-base.php index 6d4c202a6..fd275fd3b 100644 --- a/includes/transformer/class-base.php +++ b/includes/transformer/class-base.php @@ -120,11 +120,22 @@ abstract protected function get_id(); /** * Get the replies Collection. + * + * @return array The replies collection. */ public function get_replies() { return Replies::get_collection( $this->wp_object ); } + /** + * Returns the default media type for an Object. + * + * @return string The media type. + */ + public function get_media_type() { + return 'text/html'; + } + /** * Returns the ID of the WordPress Object. */ diff --git a/readme.txt b/readme.txt index 2c1b98c9e..128f6954b 100644 --- a/readme.txt +++ b/readme.txt @@ -134,7 +134,8 @@ For reasons of data protection, it is not possible to see the followers of other = Unreleased = -* Added: Screen reader text for the "Follow Me" block for improved accessibility +* Improved: Added screen reader text for the "Follow Me" block for improved accessibility +* Improved: Added `media_type` support to Activity-Object-Transformers * Improved: Clarified settings page text around which users get Activitypub profiles * Fixed: Prevent hex color codes in HTML attributes from being added as post tags * Fixed: A typo in the custom post content settings