Skip to content
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

Add Registrar Classes #97

Merged
merged 5 commits into from
Dec 4, 2024
Merged

Add Registrar Classes #97

merged 5 commits into from
Dec 4, 2024

Conversation

jjgrainger
Copy link
Owner

@jjgrainger jjgrainger commented Oct 24, 2024

This PR refactors Post Type and Taxonomy classes by moving the logic to handle registering types to WordPress to their own separate Registrar classes. This is a large change but will help towards making the codebase more maintainable.

  • Provide a separation between classes that handle setting data (PostTypes\PostType) and those that handle the logic to register objects to WordPress (PostTypes\Registrar\PostTypeRegistrar).
  • PostType and Taxonomy classes can focus more on interface and providing a clean API for engineers to use.
  • "Registrar" classes can focus on the logic of registering post types and taxonomies to WordPress.
  • Separation will improve test coverage by separating code that can be tested in isolation and code that requires integration with WordPress.
  • Makes the code cleaner to read and easier to maintain.

@jjgrainger jjgrainger force-pushed the feature/add-registrar-classes branch from 7107d13 to e37ce1d Compare October 24, 2024 23:28
@jjgrainger jjgrainger merged commit d4825dd into master Dec 4, 2024
2 of 3 checks passed
@jjgrainger jjgrainger deleted the feature/add-registrar-classes branch December 4, 2024 18:48
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.

1 participant