Skip to content

Commit

Permalink
fix crash bug when saving post
Browse files Browse the repository at this point in the history
  • Loading branch information
m1guelpf committed May 29, 2020
1 parent 323ce18 commit 5b8a2e1
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,11 @@ function sitesauce_deployments_force_fire_webhook()
* Fire a request to the webhook when a post is saved.
*
* @param int $id
* @param WP_Post $post
* @param boolean $update
* @return void
*/
function sitesauce_deployments_fire_webhook_save_post($id, $post, $update)
function sitesauce_deployments_fire_webhook_save_post($id)
{
\Sitesauce\Wordpress\WebhookTrigger::triggerSavePost($id, $post, $update);
\Sitesauce\Wordpress\WebhookTrigger::triggerSavePost($id);
}
add_action('save_post', 'sitesauce_deployments_fire_webhook_save_post');
}
Expand All @@ -70,14 +68,11 @@ function sitesauce_deployments_fire_webhook_save_post($id, $post, $update)
/**
* Fire a request to the webhook when a post is deleted.
*
* @param int $id
* @param int $post
* @param string $tax_slug
* @return void
*/
function sitesauce_deployments_fire_webhook_thrashed_post($id, $tax_id, $tax_slug)
function sitesauce_deployments_fire_webhook_thrashed_post()
{
\Sitesauce\Wordpress\WebhookTrigger::triggerTrashedPost($id, $tax_id, $tax_slug);
\Sitesauce\Wordpress\WebhookTrigger::triggerTrashedPost();
}
add_action('thrased_post', 'sitesauce_deployments_fire_webhook_thrashed_post');
}

0 comments on commit 5b8a2e1

Please sign in to comment.