title: wp_insert_post hook doesn't work when I publish a post from public area. But works fine from admin area. Why?
body: <p>When I publish a post on WordPress from ADMIN area, the hook "wp_insert_post" works fine:</p>
  
  <pre><code>function testing( $post_id, $post, $update ) {
      error_log('testing');
  }
  add_action('wp_insert_post', 'testing', 10, 3);
  </code></pre>
  
  <p>But when I publish from PUBLIC area (and there are no errors here), even using wp_insert_post to publish the post, the function above isn't called.</p>
  
  <p>Why does it happen? And is it possible to solve that?</p>