-
Notifications
You must be signed in to change notification settings - Fork 158
Enable filtering whether Distributor should update distributed post statuses when the origin post status changes #446
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
Open
adamsilverstein
wants to merge
35
commits into
develop
Choose a base branch
from
feature/distribute_post_status
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+291
−28
Open
Changes from 5 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
682d32b
dt_distribute_post_status first pass
adamsilverstein b8c6988
distribute status to external connections
adamsilverstein c0a23bc
fix typo
adamsilverstein d59c765
changes for phpcs
adamsilverstein 0297cdc
Merge branch 'develop' into feature/distribute_post_status
adamsilverstein a92e40d
status distribution tests part 1, add helper plugin
adamsilverstein 51efd70
complete testPushStatusDistribution
adamsilverstein 5e7c887
consolidate testing login into TestCase
adamsilverstein 826107f
test cleanup
adamsilverstein dbaa76b
Complete network tests
adamsilverstein 4731ed7
Add helper for creating an external connection
adamsilverstein a0f6ddb
Add tests for testExternalPushStatusDistribution
adamsilverstein a0ef118
Add test for testExternalPullStatusDistribution
adamsilverstein 8716047
when a subscription update includes status, update the post status
adamsilverstein e0d36ca
cleanup
adamsilverstein 0817a99
Subscriptions: respect dt_distribute_post_status filter
adamsilverstein 795aaa4
external push: initial push can stay as is - status is controlled in …
adamsilverstein 1a2fe66
cleanup
adamsilverstein 85446c2
Add @hook notation
adamsilverstein e1ffa7f
fixes from phpcbf
adamsilverstein 9c95b15
Don’t run testDistributedCount in block editor
adamsilverstein 32a9cfa
refactor(internal-connections): reduce indentation level
dinhtungdu 4dabefd
refactor: wrap `dt_distribute_post_status` filter in a helper function
dinhtungdu c6a89c6
fix: merge conflict
dinhtungdu 589ef5c
Merge branch 'develop' into feature/distribute_post_status
dinhtungdu f0d9398
test: fix pull external test case
dinhtungdu b44c41b
test: change expected author to `admin`
dinhtungdu 3a564fd
fix: pull test cases
dinhtungdu 68c74c7
test: fix pull external test case
dinhtungdu 4c6cb39
test: set status of pulled post throught external connection to publish
dinhtungdu 43b8867
test: active test plugin for entire network
dinhtungdu 8c11dfe
test: fix editorHasBlocks check
dinhtungdu 3dbb3b5
test: fix editorHasBlocks calls
dinhtungdu 3cbe0b5
Merge branch 'develop' into feature/distribute_post_status
dinhtungdu 3910c73
Merge branch 'develop' into feature/distribute_post_status
dinhtungdu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@adamsilverstein If I mark
$distribute_post_statusas true, the source post status will only be distributed if$args['post_status']is empty.$args['post_status']comes from the connection map for the origin post, how is that populated or changed? In any case, going off the filter name I would expect$distribute_post_statusto always take precedence, but it's very possible I'm woefully missing context here.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.
In this case of push, the
post_statuscomes from whether you have checked the 'distribute as draft' checkbox, if you have that setting overrides the filter. I do need to test subscriptions and pull, i'm not sure that works correctly. Seedistributor/includes/push-ui.php
Lines 248 to 250 in b1dd60f