updated plugin ActivityPub
version 3.3.3
This commit is contained in:
@ -1,6 +1,11 @@
|
||||
<?php
|
||||
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
||||
$post = \get_post();
|
||||
/**
|
||||
* ActivityPub Post JSON template.
|
||||
*
|
||||
* @package Activitypub
|
||||
*/
|
||||
|
||||
$post = \get_post(); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
||||
$transformer = \Activitypub\Transformer\Factory::get_transformer( $post );
|
||||
|
||||
if ( \is_wp_error( $transformer ) ) {
|
||||
@ -11,15 +16,15 @@ if ( \is_wp_error( $transformer ) ) {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Action triggerd prior to the ActivityPub profile being created and sent to the client
|
||||
/**
|
||||
* Action triggered prior to the ActivityPub profile being created and sent to the client
|
||||
*/
|
||||
\do_action( 'activitypub_json_post_pre' );
|
||||
|
||||
\header( 'Content-Type: application/activity+json' );
|
||||
echo $transformer->to_object()->to_json(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
/*
|
||||
* Action triggerd after the ActivityPub profile has been created and sent to the client
|
||||
/**
|
||||
* Action triggered after the ActivityPub profile has been created and sent to the client
|
||||
*/
|
||||
\do_action( 'activitypub_json_post_post' );
|
||||
|
Reference in New Issue
Block a user