-
Notifications
You must be signed in to change notification settings - Fork 81
Move remaining screen options logic to Screen_Options class #1957
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
Conversation
Transferred the handling of screen options and submit button display from Settings to Screen_Options for better separation of concerns and maintainability. Removed related methods and filters from Settings and added them to Screen_Options.
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.
Pull Request Overview
This PR continues the refactoring effort from #1925 by moving screen options functionality from the Settings class to the Screen_Options class for better code organization and separation of concerns.
- Moved
add_screen_option
andscreen_options_show_submit
methods from Settings to Screen_Options class - Removed explanatory paragraph from the screen options HTML output
- Updated WordPress action/filter hooks to point to the new class methods
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
includes/wp-admin/class-settings.php | Removed screen options filter hooks and deleted the add_screen_option and screen_options_show_submit methods |
includes/wp-admin/class-screen-options.php | Added the screen options filter hooks and implemented the add_screen_option and screen_options_show_submit methods |
Co-authored-by: Matthias Pfefferle <[email protected]>
Follow up to #1925.
Proposed changes: