Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | public function __construct($modelClass, WP_Post $post) |
||
30 | { |
||
31 | $this->modelClass = $modelClass; |
||
32 | $this->post = $post; |
||
33 | $this->message = str_replace([ |
||
34 | '{modelClass}', |
||
35 | '{givenPostType}', |
||
36 | '{modelPostType}' |
||
37 | ], [ |
||
38 | $this->modelClass, |
||
39 | $this->post->post_type, |
||
40 | call_user_func([$this->modelClass, 'postTypeId']) |
||
41 | ], static::MESSAGE_FORMAT); |
||
42 | } |
||
44 |