WordPress.org

Ready to get started?Download WordPress

Forums

Howto: Overriding core wp-comments-post ? (1 post)

  1. c.e.macht
    Member
    Posted 3 years ago #

    Hello

    I'd like to change l.76-81 of wp-comments-post so as to only check for name, not e-mail address (new, functional code below).

    My question is: How do I do this the correct way? Obviously, I don't want to edit core files, can I use functions.php? I only want to change this snippet, which is not a function itself as far as I understand:

    if ( get_option('require_name_email') && '' == $comment_author ) {
    	wp_die( __('Error: please fill the required fields (Name).') );
    }

    Any help is greatly appreciated! Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic