title: Get categories of a newly saved post inside the save_post hook
body: <p>I have a <code>post_save</code> hook that manages setting the title of a particular post type. Within that logic I need to retrieve the post's categories. However, the categories are not yet saved at the time the <code>post_save</code> triggers for the first save of a new post.</p>
  
  <pre><code>add_action('save_post', 'save_report');
  function save_report($post_id) {
      $data = get_post($post_id, ARRAY_A);
      if($data['post_type'] == 'report') {
          $date = get_post_meta($post_id)['date'][0];
          // I need to get the category of the post on the first time the post is saved
          // $categories only gets a value AFTER the first save
          $categories = get_the_terms($post_id, 'report_type');
          $cat_string = '';
          foreach($categories as $value) {
              $cat_string .= $value-&gt;slug;
          }
          $new_title = date('m/d/Y', strtotime($date)).' '.$cat_string;
          remove_action('save_post', 'save_report');
          wp_update_post(array(
              'ID' =&gt; $post_id,
              'post_title' =&gt; $new_title
          ));
          add_action('save_post', 'save_report');
      }
  }
  </code></pre>
  
  <p>Because of this, I have to save the post twice to get it to change the title to what I want. Is it possible to get the new category of the post as it is being saved like this?</p>