You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 21, 2024. It is now read-only.
Implement a wrapper class that allows for the fluent declaration of post types and taxonomies. The goal is to provide a more intuitive and convenient way to define arguments for post types and taxonomies using the Extended CPT library.
Tasks:
Create a new wrapper class, let’s name it “PostType”, that will serve as a fluent interface for declaring post types and taxonomies.
Implement methods in the “PostType” and “Taxonomy” class that correspond to each argument supported by the Extended CPT library.
Ensure that each method sets the corresponding argument value when invoked.
Integrate the “PostType” and “Taxonomy” class with the existing codebase, replacing manual declaration of post types and taxonomies with the fluent syntax.
Update the documentation to include information about the new fluent wrapper class and its usage.
Example Usage:
To declare a post type “book” with the argument “show_in_feed” set to true, the code can be written as follows:
PostType::make('book')->showInFeed();
Expected Outcome:
After completing this ticket, developers will be able to declare post types and taxonomies using a fluent syntax, simplifying the process and enhancing code readability. The new wrapper class will provide a convenient way to set arguments for post types and taxonomies, aligning with the principles of the Extended CPT library.