Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Hide the Publish Date for some statuses #593

Closed
stevejburge opened this issue Apr 19, 2020 · 6 comments
Closed

Hide the Publish Date for some statuses #593

stevejburge opened this issue Apr 19, 2020 · 6 comments

Comments

@stevejburge
Copy link
Member

This looks like a good idea.

We probably couldn't remove the date field, but we could hide it:

I created new statuses that are essentially various draft statuses in our workflow, but as soon as I put a post in any of them it automatically publishes or forces a publish time and date.

I'd like to be able to just have various draft statuses that move through our writing process without them having to be live or a forced time to go live in case it's not done.

@mgurtzweiler
Copy link

Any update on this issue? We're running into this using Custom Statuses and posts getting published in the past.

We have a "Media Required" draft state and as soon as a writer sets this status the PublishDate is set.

@stevejburge
Copy link
Member Author

@mgurtzweiler You can hide the status with the Editor Features option in PublishPress Capabilities. I'll close this issue for that reason

@mgurtzweiler
Copy link

What would hiding the status accomplish? We use the status fields to move posts through the workflow. The issue is setting the publish date when a status is assigned.

@stevejburge stevejburge reopened this Mar 15, 2022
@mgurtzweiler
Copy link

https://developer.wordpress.org/reference/functions/register_post_status/

It looks like setting the date_floating option to true would solve this.

@andergmartins andergmartins added this to the 3.7.1: Bug fixes milestone Mar 18, 2022
@andergmartins andergmartins self-assigned this Mar 24, 2022
@andergmartins
Copy link
Collaborator

Thanks @mgurtzweiler, this seems to be a Gutenberg issue, that is not respecting the date_floating param. We are already using date_floating = true:

https://github.com/publishpress/PublishPress/blob/master/modules/custom-status/custom-status.php#L328

If using the classic editor, the issue do not happens. But if using Gutenberg it sets the publishing date by itself if we change the post status for any custom status.

We are still looking for a fix.

@andergmartins
Copy link
Collaborator

We probably need to fix this submitting a PR to Gutenberg fixing the function isEditedPostDateFloating:

https://github.com/WordPress/gutenberg/blob/26c8b7149091a315a0da09544cc74cfdc5fbd9c3/packages/editor/src/store/selectors.js#L666-L683

That function is checking date floating for a hardcoded list of statuses. It is not recognizing custom statuses.

There is an issue for this already: WordPress/gutenberg#26984

@andergmartins andergmartins removed their assignment Apr 15, 2022
@stevejburge stevejburge removed this from the 3.10.0: Metadata Improvements milestone Oct 28, 2022
@publishpress publishpress locked and limited conversation to collaborators Jan 30, 2023
@stevejburge stevejburge converted this issue into discussion #1309 Jan 30, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants