title: Wordpress: how displaying custom error message in wp_insert_post_data()
body: <p>I'll show a custom - error message.</p>
  
  <pre><code>function ccl($data, $postarr = '') {
   if($data['post_status'] == "publish"){
    $data['post_status'] = "draft"; 
    echo '&lt;div id="my-custom-error" class="error fade"&gt;&lt;p&gt;Publish not allowed&lt;/p&gt;&lt;/div&gt;';
   }  
    return $data;
  }
  
  add_filter( 'wp_insert_post_data' , 'ccl' , '99' );
  </code></pre>
  
  <p>I've try many thinks but everytime a success message comes from wordpress that the article published. Can i kill the success message and show my own error message?</p>
  
  <p>tanks for help...</p>