Skip to content
This repository has been archived by the owner on Nov 17, 2024. It is now read-only.

Consider revising wp_statuses_unregister_status_for_post_type #78

Open
shawfactor opened this issue Apr 5, 2023 · 1 comment
Open
Assignees
Labels

Comments

@shawfactor
Copy link

Currently if the publish post status is unregistered this function also unregisters draft and pending

I think this logic should be reviewed. There are many use cases where publish may not be desired but draft are pending are

eg I created a “sent” status for a letter custom post type. I did not want unauthenticates users to access the cpt so I unregistered publish. But I did want the workflow associated with draft and pending statuses. I forked the code to get it to work but that is not ideal.

I suggest removing the current logic and if people don’t want draft and pending they can explicitly unregister them. Is that possible?

if that is not possible due to backwards compatibility then can you please add a filter so this logic can be bypassed?

@imath imath self-assigned this Apr 5, 2023
@imath imath added the task label Apr 5, 2023
@imath
Copy link
Owner

imath commented Apr 5, 2023

I see. I can't remember why I made this choice in the first place, but I'll look at it for sure. Thanks for your feedback.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants