Skip to content

Commit

Permalink
Correctly unhook from delete_post when importing
Browse files Browse the repository at this point in the history
Fixes #121. This bug was actually mostly cosmetic, as it looks like
the post is getting imported but the semaphore was
short-circuiting the import process because I incorrectly
unhooked the controller from the `delete_post` hook.
  • Loading branch information
mAAdhaTTah committed Jan 18, 2016
1 parent cce59d2 commit c1d337f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function pull_posts() {

$this->app->semaphore()->lock();
remove_action( 'save_post', array( $this, 'export_post' ) );
remove_action( 'save_post', array( $this, 'delete_post' ) );
remove_action( 'delete_post', array( $this, 'delete_post' ) );

$result = $this->app->import()->payload( $payload );

Expand Down

0 comments on commit c1d337f

Please sign in to comment.