Skip to content

Instantly share code, notes, and snippets.

Created December 11, 2012 00:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/4254784 to your computer and use it in GitHub Desktop.
Save anonymous/4254784 to your computer and use it in GitHub Desktop.
Wordpress post action
add_action('edit_post','json_dump');
function json_dump($post_id) {
global $post;
$posttype = get_post_type($post);
if ($posttype == 'tree') {
exec('/home/fufnet/treeupdater > log.txt');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment