Skip to content

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.

2 participants