Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
54eb791
Filter the post types at save time
pattonwebz Aug 5, 2025
d9439d5
Show metabox on the virtual post
pattonwebz Aug 6, 2025
99cbbde
Add filter for customizable post view link in AJAX response
pattonwebz Aug 6, 2025
c45b2f5
Refactor post ID retrieval to use a filter for enhanced flexibility
pattonwebz Aug 11, 2025
6e5703f
Refactor filter name for virtual page links
pattonwebz Aug 12, 2025
d983812
Hide readability section for virtual pages with display:none
pattonwebz Aug 12, 2025
271affd
Refactor post type retrieval to use filter for scannable post types
pattonwebz Aug 12, 2025
df67427
No longer need to check for old pro settings class
pattonwebz Aug 18, 2025
ab13da2
Return pro value right away if pro get_scannable_posts_types exists
pattonwebz Aug 18, 2025
6142569
Include 'Archives' as a custom post type in
pattonwebz Aug 18, 2025
069d9e4
refactored: virtual page check to use dedicated function for improved…
SteveJonesDev Aug 18, 2025
0873d1e
Fire an action before clearing cpt issues
pattonwebz Aug 18, 2025
e345aed
added: unit tests for edac_is_virtual_page function to enhance coverage
SteveJonesDev Aug 18, 2025
6e5e3ed
Merge pull request #1201 from equalizedigital/steve/no-issue/update-c…
SteveJonesDev Aug 18, 2025
f2bd12e
Allow scannable posts to cover virtual posts
pattonwebz Aug 20, 2025
bc4bc75
Fix a badly named filter name
pattonwebz Aug 20, 2025
0c5ff01
Refactor to use Settings::get_scannable_post_types() for post type re…
pattonwebz Aug 21, 2025
e4310ca
Don't output archive as a scannable post type in settings or visible …
pattonwebz Aug 21, 2025
fd255b7
Merge remote-tracking branch 'origin/develop' into william/pro-169-fi…
pattonwebz Aug 21, 2025
15e4287
Add a flag to skip over filtering in virtual post type to the scannables
pattonwebz Aug 21, 2025
0942007
Skip the filtering when getting scannable_post_types in 2 places
pattonwebz Aug 21, 2025
8b7c400
Refactor virtual page references to use VirtualItem
pattonwebz Aug 21, 2025
1479e49
Refactor virtual content namespace and class references
pattonwebz Aug 21, 2025
b42c504
Add system settings section to options page and move the delete setti…
pattonwebz Aug 25, 2025
cc29ba6
Add helper to check if Pro version of the plugin is active and in use
pattonwebz Aug 25, 2025
b926db8
Genericize the pro upsell bubble name, classes and markers
pattonwebz Aug 25, 2025
f2c626e
Update 'General Settings' to 'Scan Settings' on options page
pattonwebz Aug 25, 2025
7b2fe61
Include some pro setting upsells here with nulling sanitizer callbacks
pattonwebz Aug 25, 2025
3da0f7a
Fix pro upsell tagging with utm-content
pattonwebz Aug 25, 2025
6cd7e6c
Rename scan speed settings for consistency and back compatibility
pattonwebz Aug 25, 2025
7cf16c9
Add settings fields for ignoring user roles and simplified summary he…
pattonwebz Aug 25, 2025
2841157
Update some names of scan settings to be edacp for consistency with w…
pattonwebz Aug 25, 2025
1fe997b
Refactor sanitization functions for scan speed and remove Pro-only fe…
pattonwebz Aug 25, 2025
6b7f7d1
Deregister all the settings registration that happens in pro plugin
pattonwebz Aug 25, 2025
fe5688c
Move the taxonomy scanning checkbox enable/disable code info free
pattonwebz Aug 25, 2025
bc5c1ce
Refactor pro settings sanitization for backwards compatibility
pattonwebz Aug 25, 2025
89d8213
Add option to ignore user roles during activation
pattonwebz Aug 25, 2025
b255202
Make edac_is_pro slightly more rigid
pattonwebz Aug 26, 2025
ec9da2c
Run the inline upsell bubble code if the classes exist on the page
pattonwebz Aug 26, 2025
1a6228f
Fix some label_for vales
pattonwebz Aug 26, 2025
04d33f6
Fix a mismatched label_for
pattonwebz Aug 26, 2025
aa56926
Move the Archive checkbox toggle code to inside existing window load …
pattonwebz Aug 26, 2025
93be94e
Handle disabled state on the fieldset for screen readers as well when…
pattonwebz Aug 26, 2025
ab9bdb2
Add some desciptions and labeling to some callbacks, use `selected()`…
pattonwebz Aug 26, 2025
c150739
Harden the upsell url generation against possible missing values
pattonwebz Aug 26, 2025
90aa188
fix some line endings and whitespace in helpers file
pattonwebz Aug 26, 2025
96a5305
Remove extra + character on line
pattonwebz Aug 26, 2025
0e4b108
Add some initial defaults for saving values on some settings when not…
pattonwebz Aug 26, 2025
7622b19
Handle possible array name keys in bubble upsell link generation
pattonwebz Aug 26, 2025
953d1e9
Merge branch 'william/pro-169-filter-post-types-at-save-time' into wi…
pattonwebz Aug 26, 2025
800271c
Update mock class in test to reflect the current path and name in pro
pattonwebz Aug 26, 2025
c59d654
Merge pull request #1208 from equalizedigital/william/no-issue/move-p…
pattonwebz Aug 26, 2025
f4bf0b2
Refactor post type change detection to compare sorted arrays
pattonwebz Aug 26, 2025
9d1d6af
Add a Permission section for ignore permissions setting
pattonwebz Aug 26, 2025
23e8fe6
Update documentation for virtual page check to use VirtualItemType:PO…
pattonwebz Aug 26, 2025
8a4c686
Add back in the old upsell bubble class for back compat
pattonwebz Aug 26, 2025
819c1c1
Update the scan settings messaging
pattonwebz Aug 26, 2025
d99c4ca
Use a more direct comparison for types before and after setting save
pattonwebz Aug 26, 2025
0a3b14b
Update messaging for settings permission section
pattonwebz Aug 26, 2025
f5b5fea
Do 'edac_pro_setting_saving_checkbox' when saving archive scan setting
pattonwebz Aug 27, 2025
a61432c
Remove an unused sanitizer wrapper
pattonwebz Aug 27, 2025
0ab9548
Refactor scan stats handling to improve clarity
pattonwebz Aug 27, 2025
57cce49
Use edac_is_pro helper instead of direct constant check
pattonwebz Aug 27, 2025
4fc1925
Make comment more clear
pattonwebz Aug 27, 2025
e2dca0b
Make edac_get_origin_url_for_virtual_page accept string as first param
pattonwebz Aug 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion includes/classes/class-rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The filter name edacp_fill_site_scan_scannable_post_types is 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 like edacp_scannable_post_types to better reflect its purpose and align with the naming conventions of other hooks in the project.

$post_types = apply_filters( 'edacp_scannable_post_types', Helpers::get_option_as_array( 'edac_post_types' ) );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Use edac_ prefix for the custom filter hook.

The filter name edacp_fill_site_scan_scannable_post_types doesn't follow the established edac_ prefix convention used throughout the codebase for custom hooks and filters.

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

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
$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' ) );
🤖 Prompt for AI Agents
In includes/classes/class-rest-api.php at line 300, the filter hook name uses
the incorrect prefix 'edacp_'. Change the filter name from
'edacp_fill_site_scan_scannable_post_types' to
'edac_fill_site_scan_scannable_post_types' to follow the established 'edac_'
prefix convention used in the codebase.

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 );
Expand Down