Open
Description
Updating post status
What happens when a post that has been distributed is published, or changed from published to draft (or moved to the trash)
Opening this issue to discuss the expected behavior when a post that has been distributed has it's post status changed.
Expected behavior
After some internal discussion, we have decided that the expected behavior for post status changes is as follows:
Distributing:
- Pushing draft posts is disabled by default.
- Pushing drafts can be enabled by
returning true from the. [Update] This was replaced by thedt_drafts_can_be_distributed
filterdistributable_post_statuses
filter. - When a draft post is distributed, copies will always have a status of draft. The 'As Draft' option is not available when distributing drafts (showing it would be confusing).
- When a published post is distributed, copies will have a status of draft if the 'As Draft' checkbox is left checked, or 'publish' if it is unchecked.
Updating:
- When an origin published post is updated (or a draft published), no change is made to the status of distributed copies.This behavior can be overwritten by returning true from the (not yet implemented)
dt_published_posts_distribute_status
filter. [Update 2023-11-29] The default behavior is that this is disabled/false. - If the
dt_published_posts_distribute_status
is set to true and an origin post status is changed from publish to any other status (a "takedown"), or any non published post is updated ("embargo lifted"), the statuses of distributed copies are updated to match. Status could be trash, private, draft, autodraft, future, pending, etc.
Deleting
- When an origin post is deleted, remote posts are unlinked and the editor shows a warning message:
This post was distributed from [SITENAME]. However, the original has been deleted.
[Update 2023-11-29] This could be altered using the samedt_published_posts_distribute_status
set to true to similarly delete the remote posts, but this should be disabled/false by default.
Connections
- Post status updates should work the same for network and external connections
Remaining Todo after testing
Add a dt_published_posts_distribute_status
filter to determine if a posts's status should be distributed along with other post data.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Code Review