Skip to content

Instantly share code, notes, and snippets.

@steffenz
Created February 20, 2019 09:03
Show Gist options
  • Save steffenz/4c3cb727fa41465d81ad2ac6b989c328 to your computer and use it in GitHub Desktop.
Save steffenz/4c3cb727fa41465d81ad2ac6b989c328 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: Netlify Build
Description: Runs a Netlify build when saving
Author: Steffen Martinsen
Version: 0.0.1
*/
defined('ABSPATH') or die();
add_action('save_post', function($post_id, $post){
wp_remote_post('https://api.netlify.com/build_hooks/<YOUR_HOOK>');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment