-
Notifications
You must be signed in to change notification settings - Fork 19
Add initial support for handling of virtual posts #1171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
54eb791
d9439d5
99cbbde
c45b2f5
6e5703f
d983812
271affd
df67427
ab13da2
6142569
069d9e4
0873d1e
e345aed
6e5e3ed
f2bd12e
bc4bc75
0c5ff01
e4310ca
fd255b7
15e4287
0942007
8b7c400
1479e49
b42c504
cc29ba6
b926db8
f2c626e
7b2fe61
3da0f7a
6cd7e6c
7cf16c9
2841157
1fe997b
6b7f7d1
fe5688c
bc5c1ce
89d8213
b255202
ec9da2c
1a6228f
04d33f6
aa56926
93be94e
ab9bdb2
c150739
90aa188
96a5305
0e4b108
7622b19
953d1e9
800271c
c59d654
f4bf0b2
9d1d6af
23e8fe6
8a4c686
819c1c1
d99c4ca
0a3b14b
f5b5fea
a61432c
0ab9548
57cce49
4fc1925
e2dca0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -297,7 +297,7 @@ public function set_post_scan_results( $request ) { | |||||
| } | ||||||
|
|
||||||
| $post_type = get_post_type( $post ); | ||||||
| $post_types = Helpers::get_option_as_array( 'edac_post_types' ); | ||||||
| $post_types = apply_filters( 'edacp_fill_site_scan_scannable_post_types', Helpers::get_option_as_array( 'edac_post_types' ) ); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use The filter name Apply this diff to use the correct prefix: - $post_types = apply_filters( 'edacp_fill_site_scan_scannable_post_types', Helpers::get_option_as_array( 'edac_post_types' ) );
+ $post_types = apply_filters( 'edac_fill_site_scan_scannable_post_types', Helpers::get_option_as_array( 'edac_post_types' ) );📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| if ( empty( $post_types ) || ! in_array( $post_type, $post_types, true ) ) { | ||||||
|
|
||||||
| return new \WP_REST_Response( [ 'message' => 'The post type is not set to be scanned.' ], 400 ); | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filter name
edacp_fill_site_scan_scannable_post_typesis quite long and potentially misleading. The context here is saving results for a single post scan, not a 'site scan'. A more concise and accurate name would improve readability and maintainability. Consider renaming it to something likeedacp_scannable_post_typesto better reflect its purpose and align with the naming conventions of other hooks in the project.