Skip to content

Commit

Permalink
Post_Type_UI doesn't need a Transformer instance now
Browse files Browse the repository at this point in the history
  • Loading branch information
ashfame committed Dec 26, 2024
1 parent 6f2d763 commit 323a6d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/plugin/class-engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,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 );
Expand Down
6 changes: 2 additions & 4 deletions src/plugin/class-post-type-ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down

0 comments on commit 323a6d2

Please sign in to comment.