Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants