diff --git a/includes/admin/post-transition.php b/includes/admin/post-transition.php index c458b958..636e5337 100644 --- a/includes/admin/post-transition.php +++ b/includes/admin/post-transition.php @@ -40,6 +40,13 @@ function setup() { * @return object */ function maybe_publish_tweet( $new_status, $old_status, $post ) { + /** + * Add filter to return early based on post or status + */ + if ( apply_filters( 'autoshare_for_twitter_disable_on_transition_post_status', false, $post, $old_status, $new_status ) ) { + return; + } + /** * We're only interested in posts that are transitioning into publish. */