WordPress.org

Ready to get started?Download WordPress

Ideas

if DOING_AJAX is defined, use die() instead of wp_die() in wp-comments-post.php

  1. simbo
    Member

    12345

    The functions wp_allow_comment() and check_comment_flood_db(), defined in wp-includes/comment.php, are already using die() instead of wp_die() if the constant DOING_AJAX is defined.

    If wp-comments-post.php acts the same way and uses die() instead of wp_die() and wp_redirect(), it would be much easier to integrate ajaxified comments.

    Because if wp-comments-post.php only returns text strings if DOING_AJAX is set, you could just use this little php script to handle the AJAX request for adding new comments:

    define('DOING_AJAX',1);
    require('path/to/wp-comments-post.php');

    Posted: 4 years ago #
  2. John James Jacoby
    BuddyPress/bbPress Lead

    This may actually make a better trac ticket than an idea.

    http://core.trac.wordpress.org.

    Posted: 4 years ago #
  3. Jen Mylo
    Key Master

    I'm glad @simbo posted this here instead of on Trac. The goal is to get the 'should we or shouldn't we' discussions happening on Ideas forum, so that Trac can be more focused on accepted code changes, which will make it easier to manage.

    Posted: 4 years ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    6 Votes
  • Status

    This idea is under consideration

No tags yet.