-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
DataViews Extensibility: Allow unregistering the duplicate post action #64441
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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 couldn't spot any regression with the actions, and the code looks good. Can't speak about TypeScript parts :P
I noticed that we have three different duplicate actions (one for patterns, one for template and template parts and one for the rest of the post type. This seems largely unnecessary and we could unify probably.
100%. We should probably do it before stabilizing the feature.
Size Change: +99 B (+0.01%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
}; | ||
|
||
export const orderField: Field< PostWithPageAttributesSupport > = { | ||
export const orderField: Field< BasePost > = { |
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.
What's the relation between these fields + .../types
with the usePostFields
hook defined in edit-site? Last I tried to consolidate the two in a single place there was a few dependencies in the usePostFields
hook to get rid of.
#64441) Co-authored-by: youknowriad <[email protected]> Co-authored-by: ntsekouras <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: sirreal <[email protected]> Co-authored-by: jsnajdr <[email protected]>
Related #61084
Similar to #62647
What?
In #62052 an API to register and unregister dataviews actions has been implemented. But in order to allow third-party developers to be able to unregister these actions, we need to be using the same actions in Core to register the core actions. The current PR explore the possibility to use the API to register one action: "duplicate post part".
Note I noticed that we have three different duplicate actions (one for patterns, one for template and template parts and one for the rest of the post type. This seems largely unnecessary and we could unify probably.
Testing Instructions
1- Open the pages dataviews.
2- You should be able to see the "duplicate" action in the actions dropdown.
3- you can try to use the action.