Skip to content

Commit 595af07

Browse files
committed
Fixed linting issues.
1 parent c7b6206 commit 595af07

File tree

2 files changed

+1
-36
lines changed

2 files changed

+1
-36
lines changed

plugins/hwp-previews/src/Hooks/Preview_Hooks.php

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
use HWP\Previews\Preview\Post\Post_Preview_Service;
1010
use HWP\Previews\Preview\Post\Post_Settings_Service;
1111
use HWP\Previews\Preview\Post\Post_Type_Service;
12-
use HWP\Previews\Preview\Post\Status\Contracts\Post_Statuses_Config_Interface;
13-
use HWP\Previews\Preview\Post\Status\Post_Statuses_Config;
1412
use HWP\Previews\Preview\Post\Type\Contracts\Post_Types_Config_Interface;
1513
use HWP\Previews\Preview\Post\Type\Post_Types_Config_Registry;
1614
use HWP\Previews\Preview\Template\Template_Resolver_Service;
@@ -26,13 +24,6 @@ class Preview_Hooks {
2624
*/
2725
protected Post_Types_Config_Interface $types_config;
2826

29-
/**
30-
* Post statuses configuration.
31-
*
32-
* @var \HWP\Previews\Preview\Post\Status\Contracts\Post_Statuses_Config_Interface
33-
*/
34-
protected Post_Statuses_Config_Interface $statuses_config;
35-
3627
/**
3728
* Post-settings service that provides access to post-settings.
3829
*
@@ -68,13 +59,6 @@ public function __construct() {
6859
Post_Types_Config_Registry::get_post_type_config()
6960
);
7061

71-
// Initialize the post types and statuses configurations.
72-
$this->statuses_config = apply_filters(
73-
'hwp_previews_hooks_post_status_config',
74-
( new Post_Statuses_Config() )->set_post_statuses( $this->get_post_statuses() )
75-
);
76-
77-
7862
$this->post_preview_service = new Post_Preview_Service();
7963
$this->post_settings_service = new Post_Settings_Service();
8064
}
@@ -112,25 +96,6 @@ public function setup(): void {
11296
}
11397
}
11498

115-
/**
116-
* Gets a list of available post statuses for the preview functionality..
117-
*
118-
* @return array<string>
119-
*/
120-
public function get_post_statuses(): array {
121-
// @TODO - Remove
122-
$post_statuses = [
123-
'publish',
124-
'future',
125-
'draft',
126-
'pending',
127-
'private',
128-
'auto-draft',
129-
];
130-
131-
return apply_filters( 'hwp_previews_hooks_post_statuses', $post_statuses );
132-
}
133-
13499
/**
135100
* Enable post statuses as parent for the post types specified in the post types config.
136101
*

plugins/hwp-previews/src/Preview/Post/Post_Preview_Service.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ protected function set_post_parent_statuses(): void {
113113
'future',
114114
'draft',
115115
'pending',
116-
'private'
116+
'private',
117117
];
118118

119119
$this->parent_post_statuses = apply_filters( 'hwp_previews_filter_available_parent_post_statuses', $post_statuses );

0 commit comments

Comments
 (0)