Skip to content

Conversation

@ouikhuan
Copy link
Contributor

Fixes #120

When using the export command, only posts with statuses returned by get_post_statuses() (publish, pending, draft, private) can be exported. This excludes other valid WordPress post statuses like 'future' for scheduled posts and any custom post statuses.

Proposed changes

  • Replaced get_post_statuses() with get_post_stati() in the export command
  • This change allows exporting posts with any status that is registered in WordPress

@ouikhuan ouikhuan requested a review from a team as a code owner January 16, 2025 11:13
Copy link
Member

@swissspidy swissspidy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me!

Looks like it was this way ever since this command was first built.

@swissspidy swissspidy added this to the 2.1.14 milestone Jan 16, 2025
@swissspidy swissspidy merged commit 2eb9ad1 into wp-cli:main Jan 16, 2025
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export functionality limited to hardcoded post statuses

2 participants