Make WordPress Core


Ignore:
Timestamp:
11/26/2014 08:16:47 PM (9 years ago)
Author:
ocean90
Message:

Comments: Use proper HTTP response codes for validation errors.

props miqrogroove, solarissmoke, mackensen.
fixes #11286.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment.php

    r30402 r30579  
    11321132            die( __('Duplicate comment detected; it looks as though you’ve already said that!') );
    11331133        }
    1134         wp_die( __('Duplicate comment detected; it looks as though you’ve already said that!') );
     1134        wp_die( __( 'Duplicate comment detected; it looks as though you’ve already said that!' ), 409 );
    11351135    }
    11361136
     
    12501250                die( __('You are posting comments too quickly. Slow down.') );
    12511251
    1252             wp_die( __('You are posting comments too quickly. Slow down.'), '', array('response' => 403) );
     1252            wp_die( __( 'You are posting comments too quickly. Slow down.' ), 429 );
    12531253        }
    12541254    }
Note: See TracChangeset for help on using the changeset viewer.