Actually distribute the filtered post status #159
Merged
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.
A filter was introduced in #157 which allows filtering the post statuses that are allowed to be distributed. That pull request however did not pass along the post status when distributing the post. This pull request:
Adds a hidden post status input containing the current post status.
Removes the previously added
dt_drafts_can_be_distributed
filter from the push ui.The functionality provided by the
dt_drafts_can_be_distributed
is now handled by the dt_distributable_post_statuses filter.distributable_post_statuses
filter).Syndicatable function fixes:
syndicatable()
function may be called outside of a post edit screen. Thedistributable_post_types
anddistributable_post_statuses
check within it is moved to the proper context to prevent errors.(Fixes "Notice: Trying to get property of non-object in .../distributor/includes/push-ui.php on line 41").
syndicatable()
function returnedtrue
for all post types when the admin bar is shown on the front end.Related: #112
Note: The 'prefix distributable post types' change accidentally slipped in, but was removed again. That update is tracked separately in #158.