updated plugin ActivityPub version 9.1.0

This commit is contained in:
2026-07-28 15:03:10 +00:00
committed by Gitium
parent bf428f0e45
commit ff806e1811
217 changed files with 6098 additions and 3025 deletions

View File

@ -5,6 +5,18 @@
* @package Activitypub
*/
/*
* The Fediverse Preview is an authoring tool, not a public view. Refuse to render
* it for logged-out visitors as a backstop, independent of how the request routed
* here — so a soft-deleted draft's preview can never be served to the public.
*/
if ( ! \is_user_logged_in() ) {
\wp_die(
\esc_html__( 'You need to be logged in to preview this post.', 'activitypub' ),
403
);
}
$post = \get_post(); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
$transformer = \Activitypub\Transformer\Factory::get_transformer( $post );