Skip to content

Commit eb5b831

Browse files
committed
Adding missing doc blocks.
1 parent 6898425 commit eb5b831

File tree

10 files changed

+92
-14
lines changed

10 files changed

+92
-14
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
use WP_Post;
1616
use WP_REST_Response;
1717

18+
/**
19+
* Preview Hooks class
20+
*
21+
* This is the main class for handling preview-related hooks in the HWP Previews plugin.
22+
*
23+
* @package HWP\Previews
24+
*
25+
* @since 0.0.1
26+
*/
1827
class Preview_Hooks {
1928
/**
2029
* Post-settings service that provides access to post-settings.

plugins/hwp-previews/src/Integration/Faust_Integration.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88
use HWP\Previews\Preview\Post\Post_Preview_Service;
99
use HWP\Previews\Preview\Post\Post_Settings_Service;
1010

11+
/**
12+
* Faust Integration class
13+
*
14+
* This class handles the integration with the Faust plugin for HWP Previews and updates the settings accordingly.
15+
*
16+
* @package HWP\Previews
17+
*
18+
* @since 0.0.1
19+
*/
1120
class Faust_Integration {
1221
/**
1322
* The key for the admin notice.

plugins/hwp-previews/src/Preview/Parameter/Preview_Parameter.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@
77
use WP_Post;
88

99
/**
10-
* Class Callable_Preview_Parameter.
10+
* Preview Parameter class
11+
*
12+
* This class represents a parameter for the preview URL.
13+
*
14+
* @package HWP\Previews
15+
*
16+
* @since 0.0.1
1117
*/
1218
class Preview_Parameter {
1319
/**

plugins/hwp-previews/src/Preview/Parameter/Preview_Parameter_Registry.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
* Class Preview_Parameter_Registry.
1212
*
1313
* This class is responsible for registering and managing preview parameters.
14+
*
15+
* @package HwP\Previews
16+
*
17+
* @since 0.0.1
1418
*/
1519
class Preview_Parameter_Registry {
1620
/**

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,21 @@
66

77
use WP_Post_Type;
88

9+
10+
/**
11+
* Post Editor Service class
12+
*
13+
* This class provides methods to check if the post-type supports Gutenberg editor
14+
*
15+
* @package HWP\Previews
16+
*
17+
* @since 0.0.1
18+
*/
919
class Post_Editor_Service {
1020
/**
1121
* Check if the post-type supports Gutenberg editor and if the classic editor is not being forced.
1222
*
13-
* @param string $post_type Post Type slug.
23+
* @param string $post_type Post-Type slug.
1424
*/
1525
public function gutenberg_editor_enabled(string $post_type): bool {
1626
$post_type_object = get_post_type_object( $post_type );
@@ -23,7 +33,7 @@ public function gutenberg_editor_enabled(string $post_type): bool {
2333
}
2434

2535
/**
26-
* Checks if the post type supports Gutenberg.
36+
* Checks if the post-type supports Gutenberg.
2737
*
2838
* @param \WP_Post_Type $post_type Post Type object.
2939
*/
@@ -41,7 +51,7 @@ public function is_gutenberg_supported( WP_Post_Type $post_type ): bool {
4151
}
4252

4353
/**
44-
* Checks if the post type is supported by Classic Editor.
54+
* Checks if the post-type is supported by Classic Editor.
4555
*/
4656
public function is_classic_editor_forced(string $post_type): bool {
4757
if (

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

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44

55
namespace HWP\Previews\Preview\Post;
66

7+
8+
/**
9+
* Post Preview Service class
10+
*
11+
* This class provides methods to get the allowed post-types and statuses for previews.
12+
*
13+
* @package HWP\Previews
14+
*
15+
* @since 0.0.1
16+
*/
17+
718
class Post_Preview_Service {
819
/**
920
* The allowed post-types for previews.
@@ -45,7 +56,7 @@ public function get_allowed_post_types(): array {
4556
}
4657

4758
/**
48-
* Get the post statuses.
59+
* Get the post-statuses.
4960
*
5061
* @return array<string>
5162
*/
@@ -54,7 +65,7 @@ public function get_post_statuses(): array {
5465
}
5566

5667
/**
57-
* Get the post types.
68+
* Get the post-types.
5869
*
5970
* @return array<string>
6071
*/
@@ -63,7 +74,7 @@ public function get_post_types(): array {
6374
}
6475

6576
/**
66-
* Get the parent post statuses
77+
* Get the parent post-statuses
6778
*
6879
* @return array<string>
6980
*/
@@ -72,7 +83,7 @@ public function get_parent_post_statuses(): array {
7283
}
7384

7485
/**
75-
* Sets the allowed post types for previews.
86+
* Sets the allowed post-types for previews.
7687
*/
7788
protected function set_post_types(): void {
7889
$post_types = get_post_types( [ 'public' => true ], 'objects' );
@@ -87,7 +98,7 @@ protected function set_post_types(): void {
8798
}
8899

89100
/**
90-
* Sets the allowed post statuses for previews.
101+
* Sets the allowed post-statuses for previews.
91102
*/
92103
protected function set_post_statuses(): void {
93104

@@ -104,7 +115,7 @@ protected function set_post_statuses(): void {
104115
}
105116

106117
/**
107-
* Sets the allowed post statuses for parent post-types (hierarchael).
118+
* Sets the allowed post-statuses for parent post-types (hierarchical).
108119
*/
109120
protected function set_post_parent_statuses(): void {
110121

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44

55
namespace HWP\Previews\Preview\Post;
66

7+
8+
/**
9+
* Post-Settings Service class
10+
*
11+
* This class provides methods to retrieve and manage post-settings for the HWP Previews plugin.
12+
*
13+
* @package HWP\Previews
14+
*
15+
* @since 0.0.1
16+
*/
717
class Post_Settings_Service {
818
/**
919
* The settings value
@@ -52,7 +62,7 @@ public static function get_settings_group(): string {
5262
}
5363

5464
/**
55-
* Setup the settings values by retrieving them from the database or cache.
65+
* Set up the settings values it by retrieving them from the database or cache.
5666
* This method is called in the constructor to ensure settings are available.
5767
*/
5868
protected function setup(): void {

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
use HWP\Previews\Admin\Settings\Fields\Settings_Field_Collection;
88
use WP_Post;
99

10+
/**
11+
* Post-Type Service class
12+
*
13+
* This class provides methods to retrieve and manage post-settings for the HWP Previews plugin.
14+
*
15+
* @package HWP\Previews
16+
*
17+
* @since 0.0.1
18+
*/
1019
class Post_Type_Service {
1120
/**
1221
* The post-object
@@ -16,14 +25,14 @@ class Post_Type_Service {
1625
protected WP_Post $post;
1726

1827
/**
19-
* Post-preview service that provide information about the post type for previews.
28+
* Post-preview service that provide information about the post-type for previews.
2029
*
2130
* @var \HWP\Previews\Preview\Post\Post_Preview_Service
2231
*/
2332
private Post_Preview_Service $post_preview_service;
2433

2534
/**
26-
* Settings service to retrieve post type settings.
35+
* Settings service to retrieve post-type settings.
2736
*
2837
* @var \HWP\Previews\Preview\Post\Post_Settings_Service
2938
*/
@@ -41,7 +50,7 @@ public function __construct( WP_Post $post, Post_Preview_Service $post_preview_s
4150
}
4251

4352
/**
44-
* Checks if the post type is allowed for previews.
53+
* Checks if the post-type is allowed for previews.
4554
*/
4655
public function is_allowed_for_previews(): bool {
4756
return $this->is_enabled() && $this->is_allowed_post_type() && $this->is_allowed_post_status();

plugins/hwp-previews/src/Templates/admin.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
<?php
22

3+
/**
4+
* The admin settings page for the HWP Previews plugin.
5+
*
6+
* @package HWP\Previews
7+
*
8+
* @since 0.0.1
9+
*/
10+
311
declare(strict_types=1);
412

513
use HWP\Previews\Integration\Faust_Integration;

plugins/hwp-previews/src/Templates/iframe.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* This template will be used for all post/page previews
66
*
77
* @package HWP\Previews
8+
*
9+
* @since 0.0.1
810
*/
911

1012
declare(strict_types=1);

0 commit comments

Comments
 (0)