Skip to content
This repository was archived by the owner on Oct 21, 2024. It is now read-only.
This repository was archived by the owner on Oct 21, 2024. It is now read-only.

Implement Fluent Wrapper Class for Declaring Post Types and Taxonomies #2

@ogorzalka

Description

@ogorzalka

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:

  1. Create a new wrapper class, let’s name it “PostType”, that will serve as a fluent interface for declaring post types and taxonomies.
  2. Implement methods in the “PostType” and “Taxonomy” class that correspond to each argument supported by the Extended CPT library.
  3. Ensure that each method sets the corresponding argument value when invoked.
  4. Integrate the “PostType” and “Taxonomy” class with the existing codebase, replacing manual declaration of post types and taxonomies with the fluent syntax.
  5. 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.

Metadata

Metadata

Assignees

Labels

need testRequire some tests

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions