Skip to content
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

Sync: Add Jetpack Post Trashed event #6885

Merged
merged 2 commits into from Apr 6, 2017
Merged

Sync: Add Jetpack Post Trashed event #6885

merged 2 commits into from Apr 6, 2017

Conversation

enejb
Copy link
Member

@enejb enejb commented Apr 3, 2017

We current don't have a good way to track when the post is marked as
trashed.

The jetpack_post_trashed follows the same pattern as the published post event.

Changes proposed in this Pull Request:

  • Adding the jetpack_post_trashed event will let us know when we have
    post is marked as trashed.

Testing instructions:

  • Do the tests pass?
  • Do we get the expected results on the .com side. Do we hear about the event as expected?

We current don't have a good way to track when the post is marked as
trashed.

Adding the jetpack_post_trashed event will let us know when we have
post is marked as trashed.
@enejb enejb added [Package] Sync [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Apr 3, 2017
@enejb enejb requested review from lezama and gititon April 3, 2017 22:27
@@ -238,14 +241,20 @@ function filter_post_content_and_add_links( $post_object ) {
}

public function save_published( $new_status, $old_status, $post ) {
error_log( print_r( array( $new_status, $old_status ) ,1 ));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐼

wp_delete_post( $this->post->ID );
$this->sender->do_sync();

// Since the post status is not changing here we don't exect the post be trashed again.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exect the post be trashed again. => expect the post to be trashed again.

@lezama
Copy link
Contributor

lezama commented Apr 3, 2017

Nice work, left a couple of minor comments

@jeherve jeherve added [Team] Poseidon [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Apr 4, 2017
@enejb enejb added [Status] Needs Review To request a review from Crew. Label will be renamed soon. and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Apr 4, 2017
Copy link
Member

@thingalon thingalon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, seems to work:

mark_ wpdev_thingalon_dev_dfw_wordpress_com___home_wpcom_public_html ssh_wpdev bash _150x50

@thingalon thingalon added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Apr 6, 2017
@enejb enejb merged commit a8c8e34 into master Apr 6, 2017
@enejb enejb deleted the add/sync-post-statuses branch April 6, 2017 16:30
@matticbot matticbot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Apr 6, 2017
jeherve added a commit that referenced this pull request Apr 24, 2017
eliorivero pushed a commit that referenced this pull request Apr 25, 2017
* Changelog: initial commit for 4.9 release.

* Changelog: add #6929

* Changelog: move old changelogs to changelog.txt

* Readme: restore deleted release post link.

The post is now live.

* Changelog: add #6853

* Changelog: add #6856

* Changelog: add #6857

* Changelog: add #6884

* Changelog: add #6885

* Changelog: add #6892

* Changelog: add #6894

* Changelog: add #6898

* Changelog: add #6899

* Changelog: add #6900

* Changelog: add #6909

* Changelog: add #6927

* Changelog: add #6947

* Chagelog: add #6958

* Changelog: add #6961

* Changelog: add #6963

* Changelog: add #6965

* Changelog: add #6986

* Changelog: add #7000

* Changelog: add #7013

* Changelog: add #7015

* Changelog: add #7019

* Changelog: add #7028

* Changelog: add #6998

* Changelog: add #6999

* Changelog: add #7044

* Changelog: add #6881

* Changelog: add #6922

* Changelog: add #6940

* Changelog: add #6962

* Changelog: add #6942

* Changelog: add #6959

* Changelog: add #7018

* Changelog: add #6948

* Changelog: add #6657

* Changelog: add #7030

* Changelog: add #7048

* Changelog: add #7031

* Changelog: add #6990

* Changelog: add #6957

* Changelog: add #7027
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants