updated plugin ActivityPub version 2.6.1

This commit is contained in:
2024-07-19 19:46:05 +00:00
committed by Gitium
parent 19e351ef3b
commit 3b4e169a1e
39 changed files with 718 additions and 143 deletions

View File

@ -230,7 +230,7 @@ class Blog extends Actor {
*
* @return array|null The User-Header-Image.
*/
public function get_header_image() {
public function get_image() {
if ( \has_header_image() ) {
return array(
'type' => 'Image',
@ -368,4 +368,38 @@ class Blog extends Actor {
return false;
}
}
/**
* Extend the User-Output with Attachments.
*
* @return array The extended User-Output.
*/
public function get_attachment() {
$array = array();
$array[] = array(
'type' => 'PropertyValue',
'name' => \__( 'Blog', 'activitypub' ),
'value' => \html_entity_decode(
sprintf(
'<a rel="me" title="%s" target="_blank" href="%s">%s</a>',
\esc_attr( \home_url( '/' ) ),
\esc_url( \home_url( '/' ) ),
\wp_parse_url( \home_url( '/' ), \PHP_URL_HOST )
),
\ENT_QUOTES,
'UTF-8'
),
);
// Add support for FEP-fb2a, for more information see FEDERATION.md
$array[] = array(
'type' => 'Link',
'name' => \__( 'Blog', 'activitypub' ),
'href' => \esc_url( \home_url( '/' ) ),
'rel' => array( 'me' ),
);
return $array;
}
}