updated plugin ActivityPub version 0.12.0

This commit is contained in:
2020-12-25 19:23:08 +00:00
committed by Gitium
parent 440a778b7c
commit 8ded57667b
25 changed files with 597 additions and 600 deletions

View File

@ -24,9 +24,10 @@ class Webfinger {
\register_rest_route(
'activitypub/1.0', '/webfinger', array(
array(
'methods' => \WP_REST_Server::READABLE,
'callback' => array( '\Activitypub\Rest\Webfinger', 'webfinger' ),
'args' => self::request_parameters(),
'methods' => \WP_REST_Server::READABLE,
'callback' => array( '\Activitypub\Rest\Webfinger', 'webfinger' ),
'args' => self::request_parameters(),
'permission_callback' => '__return_true',
),
)
);
@ -51,7 +52,7 @@ class Webfinger {
$resource_identifier = $matches[1];
$resource_host = $matches[2];
if ( \wp_parse_url( \home_url( '/' ), PHP_URL_HOST ) !== $resource_host ) {
if ( \wp_parse_url( \home_url( '/' ), \PHP_URL_HOST ) !== $resource_host ) {
return new \WP_Error( 'activitypub_wrong_host', \__( 'Resource host does not match blog host', 'activitypub' ), array( 'status' => 404 ) );
}