Skip to content

Commit 323a6d2

Browse files
committed
Post_Type_UI doesn't need a Transformer instance now
1 parent 6f2d763 commit 323a6d2

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/plugin/class-engine.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ public function __construct() {
1818
require 'class-subject.php';
1919

2020
( function () {
21-
$transformer = new Transformer();
22-
23-
new Post_Type_UI( self::STORAGE_POST_TYPE, $transformer );
21+
new Transformer();
22+
new Post_Type_UI( self::STORAGE_POST_TYPE );
2423

2524
// REST API
2625
new Subjects_Controller( self::STORAGE_POST_TYPE );

src/plugin/class-post-type-ui.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44

55
class Post_Type_UI {
66
private string $post_type;
7-
private Transformer $transformer;
87

9-
public function __construct( $custom_post_type, Transformer $transformer ) {
10-
$this->post_type = $custom_post_type;
11-
$this->transformer = $transformer;
8+
public function __construct( $custom_post_type ) {
9+
$this->post_type = $custom_post_type;
1210

1311
$this->remove_add_new_option( $this->post_type );
1412

0 commit comments

Comments
 (0)