fix
Some checks failed
PHP Code Checker / PHP Code Checker (pull_request) Failing after 45s
PHPUnit / PHPUnit – PHP 7.4 (pull_request) Failing after 55s
PHPUnit / PHPUnit – PHP 8.0 (pull_request) Successful in 1m4s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Successful in 1m1s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Successful in 1m3s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Successful in 1m15s
PHPUnit / PHPUnit – PHP 8.4 (pull_request) Successful in 1m3s
Some checks failed
PHP Code Checker / PHP Code Checker (pull_request) Failing after 45s
PHPUnit / PHPUnit – PHP 7.4 (pull_request) Failing after 55s
PHPUnit / PHPUnit – PHP 8.0 (pull_request) Successful in 1m4s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Successful in 1m1s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Successful in 1m3s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Successful in 1m15s
PHPUnit / PHPUnit – PHP 8.4 (pull_request) Successful in 1m3s
This commit is contained in:
parent
be52d2705f
commit
c44d692aa4
1 changed files with 7 additions and 1 deletions
|
@ -13,6 +13,7 @@ use Activitypub\Activity\Extended_Object\Event;
|
||||||
use Activitypub\Collection\Actors;
|
use Activitypub\Collection\Actors;
|
||||||
|
|
||||||
use function Activitypub\get_remote_metadata_by_actor;
|
use function Activitypub\get_remote_metadata_by_actor;
|
||||||
|
use function Activitypub\is_activitypub_request;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class for handling and saving the ActivityPub event sources (i.e. follows).
|
* Class for handling and saving the ActivityPub event sources (i.e. follows).
|
||||||
|
@ -135,6 +136,10 @@ class Event_Sources {
|
||||||
return $template;
|
return $template;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( ! is_activitypub_request() ) {
|
||||||
|
return $template;
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! \is_singular() ) {
|
if ( ! \is_singular() ) {
|
||||||
return $template;
|
return $template;
|
||||||
}
|
}
|
||||||
|
@ -146,7 +151,8 @@ class Event_Sources {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! str_starts_with( \get_site_url(), $post->guid ) ) {
|
if ( ! str_starts_with( \get_site_url(), $post->guid ) ) {
|
||||||
\wp_safe_redirect( $post->guid, 301 );
|
\wp_redirect( $post->guid, 301 );
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $template;
|
return $template;
|
||||||
|
|
Loading…
Reference in a new issue