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

[bw_new] - support updates to existing content #36

Open
bobbingwide opened this issue Aug 7, 2022 · 0 comments
Open

[bw_new] - support updates to existing content #36

bobbingwide opened this issue Aug 7, 2022 · 0 comments
Assignees

Comments

@bobbingwide
Copy link
Owner

For bigrams I want to be able to update existing entries if one already exists but doesn't have an attached featured image.
See bobbingwide/bigram#28

Requirement

  • Ability to update an existing post with the given title
  • Ability for plugins to determine the post's new field values

Solution

  • Extend the [bw_new] shortcode to check if the post already exists and offer an update capability.
  • Implement a filter called bw_new_pre_update_post to enable a plugin to indicate whether or not it's happy for the update to proceed and for the plugin to set the new value for post_content, etc.
  • It's the plugin's responsibility to applying the changes to the post's fields.
  • If the filter returns null then don't update the existing post.
  • The logic will only apply for logged in users who can "publish" a new post immediately. ie when the post_status is "publish".
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