Skip to content

Core Data: Extend PostStatus type to support all WordPress statuses#71157

Open
Sukhendu2002 wants to merge 1 commit intoWordPress:trunkfrom
Sukhendu2002:fix/71144-extend-poststatus-type
Open

Core Data: Extend PostStatus type to support all WordPress statuses#71157
Sukhendu2002 wants to merge 1 commit intoWordPress:trunkfrom
Sukhendu2002:fix/71144-extend-poststatus-type

Conversation

@Sukhendu2002
Copy link
Contributor

What?

Fixes #71144
Extends the PostStatus TypeScript type definition in the core-data package to include all default WordPress post statuses and support for custom statuses.

How?

Modified the PostStatus type in /packages/core-data/src/entity-types/helpers.tsto:

  • Add missing default statuses: trash, auto-draft, inherit
  • Support custom statuses using the (string & {}) pattern

@yogeshbhutkar yogeshbhutkar added [Type] Enhancement A suggestion for improvement. [Package] Core data /packages/core-data labels Aug 11, 2025
@Sukhendu2002 Sukhendu2002 marked this pull request as ready for review August 11, 2025 20:13
@Sukhendu2002 Sukhendu2002 requested a review from nerrad as a code owner August 11, 2025 20:13
@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Sukhendu2002 <sukhendu2002@git.wordpress.org>
Co-authored-by: priethor <priethor@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Core data /packages/core-data [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow the Post Status type definition to support all default statuses and custom ones

2 participants