Actually distribute the filtered post status#159
Merged
Conversation
Removes the dt_drafts_can_be_distributed filter logic making the 'as draft' checkbox visible if the post is not a draft.
This somehow snuck in and is a potential breaking change handled in #158
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_distributedfilter from the push ui.The functionality provided by the
dt_drafts_can_be_distributedis now handled by the dt_distributable_post_statuses filter.distributable_post_statusesfilter).Syndicatable function fixes:
syndicatable()function may be called outside of a post edit screen. Thedistributable_post_typesanddistributable_post_statusescheck 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 returnedtruefor 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.