fix init of new transformer instance
This commit is contained in:
commit
9c20c8fced
2 changed files with 5 additions and 4 deletions
|
@ -65,7 +65,7 @@ class Activity_Dispatcher {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$transformer = \Activitypub\Transformer\Transformers_Manager::instance()->get_transformer( $wp_post );
|
$transformer = Transformers_Manager::instance()->get_transformer( $wp_post );
|
||||||
$object = $transformer->to_object();
|
$object = $transformer->to_object();
|
||||||
|
|
||||||
$activity = new Activity();
|
$activity = new Activity();
|
||||||
|
@ -102,7 +102,7 @@ class Activity_Dispatcher {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$transformer = \Activitypub\Transformer\Transformers_Manager::instance()->get_transformer( $wp_post );
|
$transformer = Transformers_Manager::instance()->get_transformer( $wp_post );
|
||||||
$object = $transformer->to_object();
|
$object = $transformer->to_object();
|
||||||
|
|
||||||
$activity = new Activity();
|
$activity = new Activity();
|
||||||
|
|
|
@ -33,8 +33,9 @@ class Post {
|
||||||
public function __construct( $post, $post_author = null ) {
|
public function __construct( $post, $post_author = null ) {
|
||||||
_deprecated_function( __CLASS__, '1.0.0', '\Activitypub\Transformer\Post' );
|
_deprecated_function( __CLASS__, '1.0.0', '\Activitypub\Transformer\Post' );
|
||||||
|
|
||||||
$this->post = $post;
|
$this->post = $post;
|
||||||
$this->object = Transformer_Post->set_wp_post( $post )->to_object();
|
$transformer = new Transformer_Post();
|
||||||
|
$this->object = $transformer->set_wp_post( $post )->to_object();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue