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

Add a button to create a new related post under the meta box #65

Open
1 task done
PypWalters opened this issue May 19, 2022 · 0 comments
Open
1 task done

Add a button to create a new related post under the meta box #65

PypWalters opened this issue May 19, 2022 · 0 comments

Comments

@PypWalters
Copy link

Is your enhancement related to a problem? Please describe.

It would be a UX improvement to have the option to create a new related post from within the post meta box of another post. The use case is if you need to relate a post to another post that does not yet exist. We could create a button, that when clicked, hits a custom endpoint that will create a new post (of the appropriate CPT based on the relationship settings) and automatically create the relationship. The endpoint will then return the ID of the new post, and open the editor for that new post in a new tab. It will also need to update the "Related Posts" listing in the post where it was originally created.

Designs

The design for the button would be similar to the "+ Add New Category" button for taxonomies, except it would open the cpt in a new window since a CPT would have a lot more details to fill in.

what-is-a-taxonomy-1

Describe alternatives you've considered

We could just add a filter at the bottom of the render function ( https://github.com/10up/wp-content-connect/blob/master/includes/UI/MetaBox.php#L40 ) and allow developers to add whatever they would like under the meta box, but it would be difficult to trigger a refresh of the related post list.

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant