diff --git a/src/plugin/class-engine.php b/src/plugin/class-engine.php index 78e0017e..e8ae2d62 100644 --- a/src/plugin/class-engine.php +++ b/src/plugin/class-engine.php @@ -19,9 +19,8 @@ public function __construct() { require 'class-subject.php'; ( function () { - $transformer = new Transformer(); - - new Post_Type_UI( self::STORAGE_POST_TYPE, $transformer ); + new Transformer(); + new Post_Type_UI( self::STORAGE_POST_TYPE ); // REST API new Subjects_Controller( self::STORAGE_POST_TYPE ); diff --git a/src/plugin/class-post-type-ui.php b/src/plugin/class-post-type-ui.php index a607791f..f1a9b787 100644 --- a/src/plugin/class-post-type-ui.php +++ b/src/plugin/class-post-type-ui.php @@ -4,11 +4,9 @@ class Post_Type_UI { private string $post_type; - private Transformer $transformer; - public function __construct( $custom_post_type, Transformer $transformer ) { - $this->post_type = $custom_post_type; - $this->transformer = $transformer; + public function __construct( $custom_post_type ) { + $this->post_type = $custom_post_type; $this->remove_add_new_option( $this->post_type );