-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Introduce wp:action-publish
; update corresponding UI to reference
#6670
Conversation
'type' => 'object', | ||
'properties' => array( | ||
'status' => array( | ||
'type' => 'string', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is only for publish, then it should have an enum entry. "enum": [ "publish", "future" ]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cf894ca175f7c8826f7e55c07dc56d3a1dbbbaa7
Bit by #6683 |
b0473f4
to
b750e88
Compare
return { | ||
hasPublishAction: get( getCurrentPost(), [ '_links', 'wp:action-publish' ], false ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel there should be a dedicated selector or a mechanism to make this clearer. I see selectors as something that should reflect data needs. I don't have the perfect solution though:
- Something like
canDoActionOnCurrentPost( state, 'publish' )
would work but it's specific to the current post. - Just an utility like
canDoAction( record, 'publish' )
could work too but it enforces the fact that the_links
property is part of the record where ideally it shouldn't be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is covered by, #6655.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Description
Introduces a
wp:action-publish
targetSchema
attribute and updatespost-pending-status
,post-schedule
, andpost-visibility
to reference it.See #6361
Previously #6529 #6630
How has this been tested?
Sign in as an Author to see the corresponding UI as editable:
As a Contributor, this UI is no longer accessible:
Checklist: