-
Notifications
You must be signed in to change notification settings - Fork 156
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
get post from original id #411
base: develop
Are you sure you want to change the base?
get post from original id #411
Conversation
@adamsilverstein @dkotter if either of you have time to review this that would be great, thanks! |
@jeffpaul I'll take a look |
Hey @avag-novembit thanks for your contribution. I have a few questions about the Issue/PR:
|
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.
left some questions and feedback
Hey @adamsilverstein, thanks for getting back. Let me try to answer the questions.
The purpose of this pull request, and most of the my pull request, is to make the plug-in more extendable. It's used in add-ons (e.g. handle distribution of Advanced Custom Fields or WooCommerce products) which are in the development process currently. I think it'd be better to have a function inside the plug-in to provide API for add-ons, though open to other suggestions.
Distributed to the so called external connections? If so, we can.
Agreed that it'd be better to call it
For the internal connections I think it would be possible, however for the external connections I believe it won't work out. |
If I understand this PR correctly, its purpose is to find the post or posts that are distributed from a particular post. EG you pass a post ID and the function would return all posts that (are on the same network install) and contain the To be genuinely useful as a plugin helper I would expect this function to work for any connection type: external or network (or others - connection types can be added). The current implementation only works with network connections. Looking into the code I found that for the information you need is already tracked and available in the For example here is the data stored in a post I have distributed to both internal and external connections: You can search the codebase for usage to see where we set up and use the connection map. I still feel like this PR could be useful for retrieving the list of distributed post ids from a post. I would consider adding a helper function that:
|
Yes, the purpose of PR is to find the "child"/"dependent" post or posts that are distributed from a particular post. In essence the logic could be organized using |
Unassigning reviewers here while we focus on the v2 refactoring and can then reassess how best to handle the root issue here. |
@avag-novembit thanks for the PR! Could you please rebase your PR on top of the latest changes in the base branch? |
Added function to get posts using original post id stored in
postmeta
table. closes #410.