updated plugin ActivityPub
version 2.6.1
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user