Hello,
I am new to wordpress hooks. I would like to accomplish something when I save on the publish button of an article. I can’t find the hook to use which would trigger just when clicking on the button to save / save an article.
To test, I placed this code in function.php, but nothing appears:
function example($post_ID)
{
echo '<script language="javascript">';
echo 'alert(SAVED)';
echo '</script>';
}
add_action('publish_post', 'example');
I try many hook, like save_post, but no succes.