Merge branch 'master' into add/extendable-transformers
This commit is contained in:
commit
75f1da13e8
1 changed files with 10 additions and 0 deletions
|
@ -279,6 +279,16 @@ function is_activitypub_request() {
|
|||
return false;
|
||||
}
|
||||
|
||||
// Check if the current post type supports ActivityPub.
|
||||
if ( \is_singular() ) {
|
||||
$queried_object = \get_queried_object();
|
||||
$post_type = \get_post_type( $queried_object );
|
||||
|
||||
if ( ! \post_type_supports( $post_type, 'activitypub' ) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// One can trigger an ActivityPub request by adding ?activitypub to the URL.
|
||||
// phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.VariableRedeclaration
|
||||
global $wp_query;
|
||||
|
|
Loading…
Reference in a new issue