Closed jmichaelward closed 5 years ago
I'm working on this in tandem with #3. Feature branch at feature/content-type-abstraction, but each will have its own issue branch until merged, which should be approved in sequence.
Example class here: https://github.com/WebDevStudios/oops-wp/blob/issue/%236-add-abstract-contenttype-class/src/Structure/Content/ContentType.php
This work has been completed and merged. Closing.
Custom post type and taxonomy registration in WordPress, at their core, are very similar - each requires a slug, a set of arguments, and some labels. Taxonomies, of course, need to know which post types they support, so there are differences, but in general, we should be able to define the shared aspects of these two class types and include them with the library.
The result of this issue should be a new abstract class that defines these shared elements. A PostType in the 1.0.0 release will need to extend this class.