Skip to content

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

Merged
merged 4 commits into from
Jul 18, 2025

Conversation

obenland
Copy link
Member

Follow up to #1925.

Proposed changes:

  • Transferred the handling of screen options and submit button display from Settings to Screen_Options for better separation of concerns.
  • Removed context string for improved compatibility with table screen options.

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.
@obenland obenland requested a review from pfefferle July 18, 2025 00:43
@obenland obenland self-assigned this Jul 18, 2025
@Copilot Copilot AI review requested due to automatic review settings July 18, 2025 00:43
Copy link

@Copilot Copilot AI left a 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 and screen_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

@Automattic Automattic deleted a comment from Copilot AI Jul 18, 2025
@obenland obenland added the Skip Changelog Disables the "Changelog Updated" action for PRs where changelog entries are not necessary. label Jul 18, 2025
pfefferle
pfefferle previously approved these changes Jul 18, 2025
@obenland
Copy link
Member Author

@obenland obenland merged commit 213efba into trunk Jul 18, 2025
11 checks passed
@obenland obenland deleted the update/screen-options branch July 18, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] WP Admin Skip Changelog Disables the "Changelog Updated" action for PRs where changelog entries are not necessary.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants