Skip to content

Commit

Permalink
Add media type support (#1045)
Browse files Browse the repository at this point in the history
* Add media type support

improve content handling.

see #1044

* add changelog

* Fix typo

---------

Co-authored-by: Konstantin Obenland <[email protected]>
  • Loading branch information
pfefferle and obenland authored Dec 5, 2024
1 parent 930db56 commit 87d6f15
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions includes/transformer/class-base.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
3 changes: 2 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 87d6f15

Please sign in to comment.