modified file enshrined

This commit is contained in:
2024-07-19 19:46:16 +00:00
committed by Gitium
parent 39ec06fbc1
commit 51937c2f57
856 changed files with 3722 additions and 180872 deletions

View File

@ -2,7 +2,7 @@
namespace Activitypub\Model;
use Activitypub\Collection\Users;
use Activitypub\Transformer\Post as Post_Transformer;
use Activitypub\Transformer\Factory;
/**
* ActivityPub Post Class
@ -32,10 +32,14 @@ class Post {
*/
// phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed, VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
public function __construct( $post, $post_author = null ) {
_deprecated_function( __CLASS__, '1.0.0', '\Activitypub\Transformer\Post' );
_deprecated_function( __METHOD__, '1.0.0', '\Activitypub\Transformer\Factory::get_transformer' );
$this->post = $post;
$this->object = Post_Transformer::transform( $post )->to_object();
$transformer = Factory::get_transformer( $post );
if ( ! \is_wp_error( $transformer ) ) {
$this->post = $post;
$this->object = $transformer->to_object();
}
}
/**