develop - Added base classes and screen options post type#4
develop - Added base classes and screen options post type#4milindmore22 merged 64 commits intomainfrom
Conversation
…nused code in Assets, Admin, and Settings modules
There was a problem hiding this comment.
Pull request overview
This PR refactors the plugin's architecture by introducing base classes for post types and meta boxes, adding a new "Default Screen Options" post type, and removing the previous governing/consumer site functionality along with its associated settings, API keys, and encryption logic.
- Adds Abstract_Post_Type and Abstract_Meta_Box base classes for extensibility
- Introduces a new Default_Screen_Options post type with meta boxes for managing screen options, roles, and lock settings
- Removes governing/consumer site architecture, API key management, and encryption functionality
- Simplifies the Settings and Admin classes by removing REST API registration, site selection modals, and admin menu creation
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| inc/Modules/Post_Types/Abstract_Post_Type.php | New base class for registering custom post types with shared functionality |
| inc/Modules/Post_Types/Default_Screen_Options.php | Registers the "Default Screen Options" post type under Settings menu |
| inc/Modules/Meta/Abstract_Meta_Box.php | New base class for registering meta boxes with common hooks |
| inc/Modules/Meta/Screen_Options_Meta.php | Implements meta boxes for screen options configuration, role assignment, and locking |
| inc/Modules/Meta/Screen_Initializer.php | Initializes admin screens to capture and store available columns for post types |
| inc/Modules/Settings/Settings.php | Removes all settings registration logic, API key management, and site type functions |
| inc/Modules/Settings/Admin.php | Removes admin menu pages, submenus, and onboarding modal functionality |
| inc/Modules/Core/Assets.php | Removes unused asset handles for onboarding, plugin manager, and pull requests |
| inc/Main.php | Adds new post type and meta box classes; removes permalink validation check |
| inc/Autoloader.php | Corrects plugin name from "ScreenOptions" to "Screen Options" in error message |
| uninstall.php | Removes blank line from empty function body |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…creen_Initializer classes
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated 15 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…it; enhance nonce verification in Screen_Options_Meta class
…role-based screen options; improve checkbox handling and notifications for locked options.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 15 changed files in this pull request and generated 19 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…Screen_Options, Screen_Initializer, and Screen_Options_Meta classes; remove commented-out code in phpstan configuration.
…s and adjust null handling in Screen_Initializer
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 16 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…le_Based_Screen_Options and Screen_Options_Meta classes
…ole handling; improve checkbox UI and add all users option
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 16 changed files in this pull request and generated 16 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…nce activation hook to capture columns and clear transient
…related methods in Role_Based_Screen_Options, Screen_Initializer, and Screen_Options_Meta
…shes from function calls for improved readability
…ptions_Meta for consistency
… code structure and error handling
…ializer and Screen_Options_Meta to utilize Cache methods
… and plugin options
… condition checks and adjusting import statements across multiple modules.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 34 changed files in this pull request and generated 13 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… and clarity; remove unused check_role_access_to_post_type method from Screen_Options_Meta; update phpstan configuration and fix typo in readme.txt
…re-capture; improve column capture logic by removing additional filters.
…Based_Screen_Options class
… in admin.js for consistency
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 34 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
up1512001
left a comment
There was a problem hiding this comment.
Approved with one suggested change.
| */ | ||
| function delete_all_transients(): void { | ||
| // Use the Cache class method to clear all transients. | ||
| Cache::clear_all_transients(); |
There was a problem hiding this comment.
this will throw fatal error unless we define SCREENOPTIONS_DIR to uninstall.php
https://github.com/rtCamp/OneSearch/blob/52b07171efcb3e3bfefb053c4570adc5a43c9b70/uninstall.php#L17
…_DIR is defined before use
This PR adds Screen Options features that enables administrators to manage admin screen options and column visibility across their WordPress site.
Key Features
✅ Testing Checklist