Tag Info

Hot answers tagged

3

is_page() is not available at that point try using global $post that way the post ID should be available for comparison. add_filter( 'preprocess_comment', 'wpb_preprocess_comment' ); function wpb_preprocess_comment($comment) { global $post; if ((strlen( $comment['comment_content'] ) < 60 ) && ($post->ID == 42)) { wp_die('Minimum allowed ...



Only top voted, non community-wiki answers of a minimum length are eligible