Require minimum word count to published post

function minWord($content){
        global $post;
        $num = 100; //set this to the minimum number of words
        $content = $post->post_content;
        if (str_word_count($content) <  $num)
            wp_die( __('Error: your post is below the minimum word count.') );
}
add_action('publish_post', 'minWord');

Leave a Reply

Your email address will not be published. Required fields are marked *