title: Set a post to 'pending' if it get more then 3 reports in wordpress
body: <p>I am using wp user frontend, and I have also downloaded a plugin called 'WP-Reportpost'.</p>
  
  <p>What I am trying to do is that I want users to add post with WP User Frontend (which is working), but when a post get more then 3 reports from other users it should change it status from 'Published' too 'Pending'. </p>
  
  <p>I am trying to make a function in functions.php, but I can't get the code to work.
  So far I got this:</p>
  
  <pre><code> /* Set posts to pending */
  function change_post_status($post_id,$status){
      $current_post = get_post( $post_id, 'ARRAY_A' );
      $current_post['post_status'] = $status;
      wp_update_post($current_post);
  }
  </code></pre>
  
  <p>and in reports.php I have put this code:</p>
  
  <pre><code>if(count($report) &gt;= 3){
      change_post_status($report-&gt;postID,'pending');
  }
  </code></pre>
  
  <p>The the post still has status as 'Published' and not 'Pending'. </p>
  
  <p>Any tips?</p>