Skip to content

develop - Added base classes and screen options post type#4

Merged
milindmore22 merged 64 commits intomainfrom
develop
Jan 29, 2026
Merged

develop - Added base classes and screen options post type#4
milindmore22 merged 64 commits intomainfrom
develop

Conversation

@milindmore22
Copy link
Copy Markdown
Contributor

@milindmore22 milindmore22 commented Jan 7, 2026

This PR adds Screen Options features that enables administrators to manage admin screen options and column visibility across their WordPress site.

Key Features

  • Default screen options configuration
  • Column visibility management
  • Lock settings functionality
  • Role-based screen options
  • Custom post type support

✅ Testing Checklist

  • All documentation files reviewed for consistency
  • No references to incorrect "plugin management" functionality remain
  • Installation instructions match actual plugin setup process
  • Development guide reflects actual module structure
  • README.md and readme.txt are aligned
  • All links and references are correct

Copilot AI review requested due to automatic review settings January 7, 2026 10:59
Copy link
Copy Markdown

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 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.

Comment thread inc/Modules/Meta/Screen_Options_Meta.php Outdated
Comment thread inc/Modules/Meta/Screen_Initializer.php Outdated
Comment thread inc/Modules/Meta/Screen_Options_Meta.php Outdated
Comment thread inc/Modules/Meta/Screen_Options_Meta.php Outdated
Comment thread inc/Modules/Meta/Screen_Options_Meta.php Outdated
Comment thread inc/Modules/Meta/Screen_Initializer.php
Comment thread inc/Modules/Post_Types/Default_Screen_Options.php Outdated
Comment thread inc/Modules/Meta/Screen_Options_Meta.php Outdated
Comment thread inc/Modules/Meta/Screen_Options_Meta.php Outdated
Comment thread inc/Modules/Meta/Abstract_Meta_Box.php Outdated
Copilot AI review requested due to automatic review settings January 7, 2026 13:22
Copy link
Copy Markdown

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

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.

Comment thread inc/Modules/Meta/Screen_Initializer.php
Comment thread inc/Modules/Meta/Screen_Initializer.php
Comment thread inc/Modules/Meta/Screen_Initializer.php Outdated
Comment thread inc/Modules/Meta/Screen_Options_Meta.php Outdated
Comment thread inc/Modules/Post_Types/Default_Screen_Options.php
Comment thread inc/Modules/Meta/Screen_Initializer.php Outdated
Comment thread inc/Modules/Meta/Abstract_Meta_Box.php
Comment thread inc/Modules/Settings/Admin.php Outdated
Comment thread inc/Modules/Meta/Screen_Options_Meta.php Outdated
Comment thread inc/Modules/Meta/Screen_Options_Meta.php Outdated
…it; enhance nonce verification in Screen_Options_Meta class
…role-based screen options; improve checkbox handling and notifications for locked options.
Copilot AI review requested due to automatic review settings January 8, 2026 14:48
Copy link
Copy Markdown

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

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.

Comment thread inc/Modules/Column_Assignment/Role_Based_Screen_Options.php Outdated
Comment thread inc/Modules/Column_Assignment/Role_Based_Screen_Options.php Outdated
Comment thread inc/Modules/Meta/Screen_Options_Meta.php Outdated
Comment thread inc/Modules/Meta/Screen_Initializer.php
Comment thread inc/Modules/Meta/Screen_Options_Meta.php Outdated
Comment thread inc/Modules/Column_Assignment/Role_Based_Screen_Options.php Outdated
Comment thread inc/Modules/Column_Assignment/Role_Based_Screen_Options.php Outdated
Comment thread inc/Modules/Column_Assignment/Role_Based_Screen_Options.php Outdated
Comment thread inc/Modules/Meta/Screen_Options_Meta.php Outdated
Comment thread assets/src/css/admin.scss Outdated
…Screen_Options, Screen_Initializer, and Screen_Options_Meta classes; remove commented-out code in phpstan configuration.
…s and adjust null handling in Screen_Initializer
Copilot AI review requested due to automatic review settings January 8, 2026 15:53
Copy link
Copy Markdown

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

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.

Comment thread assets/src/js/admin.js Outdated
Comment thread inc/Modules/Meta/Screen_Initializer.php
Comment thread inc/Modules/Column_Assignment/Role_Based_Screen_Options.php Outdated
Comment thread inc/Modules/Column_Assignment/Role_Based_Screen_Options.php Outdated
Comment thread inc/Modules/Meta/Screen_Options_Meta.php Outdated
Comment thread inc/Modules/Post_Types/Default_Screen_Options.php Outdated
…le_Based_Screen_Options and Screen_Options_Meta classes
…ole handling; improve checkbox UI and add all users option
Copilot AI review requested due to automatic review settings January 9, 2026 11:34
Copy link
Copy Markdown

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

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.

Comment thread inc/Modules/Meta/Screen_Options_Meta.php Outdated
Comment thread inc/Modules/Meta/Screen_Options_Meta.php Outdated
Comment thread inc/Modules/Column_Assignment/Role_Based_Screen_Options.php Outdated
Comment thread inc/Modules/Core/Assets.php Outdated
Comment thread inc/Modules/Meta/Screen_Options_Meta.php Outdated
Comment thread inc/Modules/Post_Types/Abstract_Post_Type.php
Comment thread inc/Modules/Meta/Screen_Options_Meta.php Outdated
Comment thread inc/Modules/Column_Assignment/Role_Based_Screen_Options.php
Comment thread inc/Modules/Column_Assignment/Role_Based_Screen_Options.php
Comment thread inc/Modules/Column_Assignment/Role_Based_Screen_Options.php
Copilot AI review requested due to automatic review settings January 28, 2026 15:37
Copy link
Copy Markdown

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

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.

Comment thread readme.txt
Comment thread inc/Modules/Meta/Meta_Fields.php Outdated
Comment thread inc/Modules/Meta/Screen_Initializer.php
Comment thread inc/Modules/Meta/Screen_Initializer.php
Comment thread phpstan.neon.dist Outdated
Comment thread readme.txt Outdated
Comment thread .distignore Outdated
Comment thread screen-options.php
Comment thread assets/src/js/admin.js
Comment thread inc/Modules/Column_Assignment/Role_Based_Screen_Options.php
… 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.
@milindmore22 milindmore22 requested review from Copilot and removed request for Copilot January 28, 2026 16:57
Copilot AI review requested due to automatic review settings January 28, 2026 17:19
Copy link
Copy Markdown

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

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.

Comment thread inc/Modules/Column_Assignment/Role_Based_Screen_Options.php
Comment thread readme.txt
Comment thread uninstall.php
Comment thread inc/Modules/Meta/Screen_Options_Meta.php
Comment thread inc/Modules/Meta/Screen_Initializer.php
up1512001
up1512001 previously approved these changes Jan 29, 2026
Copy link
Copy Markdown
Member

@up1512001 up1512001 left a comment

Choose a reason for hiding this comment

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

Approved with one suggested change.

Comment thread uninstall.php
*/
function delete_all_transients(): void {
// Use the Cache class method to clear all transients.
Cache::clear_all_transients();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this will throw fatal error unless we define SCREENOPTIONS_DIR to uninstall.php
https://github.com/rtCamp/OneSearch/blob/52b07171efcb3e3bfefb053c4570adc5a43c9b70/uninstall.php#L17

@milindmore22 milindmore22 merged commit 77acc15 into main Jan 29, 2026
6 of 11 checks passed
@milindmore22 milindmore22 deleted the develop branch February 20, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants