Commit Graph

15 Commits

Author SHA1 Message Date
John Blackbourn 644632bec5 Revert the introduction of validation of the comment author's email address when sanity checking input in `wp-comments-post.php` (introduced in r34274). This allows a problematic email address to fall through to the correct validation routine and show the "Please enter a valid email address" as expected.
Fixes #23416


git-svn-id: https://develop.svn.wordpress.org/trunk@34693 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 17:26:44 +00:00
Scott Taylor c5963b8760 In `wp-comments-post.php`, sanity check a few of the comment inputs that are expected to be a string beford calling string-only functions on them.
Props Kloon.
Fixes #23416.


git-svn-id: https://develop.svn.wordpress.org/trunk@34274 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-17 22:21:06 +00:00
Scott Taylor 5cce4a3262 After [33961], pass `$comment` to `get_comment_link()` where possible to avoid extra cache/db lookups.
See #33638.


git-svn-id: https://develop.svn.wordpress.org/trunk@34042 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-11 06:20:56 +00:00
Scott Taylor 60ba8b05e4 Introduce `WP_Comment` class to model/strongly-type rows from the comments database table. Inclusion of this class is a pre-req for some more general comment cleanup and sanity.
* Takes inspiration from `WP_Post` and adds sanity to comment caching. 
* Clarifies when the current global value for `$comment` is returned. The current implementation in `get_comment()` introduces side effects and an occasion stale global value for `$comment` when comment caches are cleaned.
* Strongly-types `@param` docs
* This class is marked `final` for now

Props wonderboymusic, nacin.

See #32619.


git-svn-id: https://develop.svn.wordpress.org/trunk@33891 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-03 18:16:35 +00:00
Scott Taylor 6fd11624d1 The keyword `elseif` should be used instead of `else if` so that all control keywords look like single words.
This was a mess, is now standardized across the codebase, except for a few 3rd-party libs. 

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31090 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 07:04:40 +00:00
Dominik Schilling (ocean90) fb8588f115 Comments: Use proper HTTP response codes for validation errors.
props miqrogroove, solarissmoke, mackensen.
fixes #11286.

git-svn-id: https://develop.svn.wordpress.org/trunk@30579 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-26 20:16:47 +00:00
Sergey Biryukov c556e74943 wp_insert_comment() and wp_new_comment() should check if the comment was successfully inserted into the database.
props pento.
fixes #28254.

git-svn-id: https://develop.svn.wordpress.org/trunk@28672 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-05 04:37:02 +00:00
Sergey Biryukov 47510a2092 Correct @since value. see #26869.
git-svn-id: https://develop.svn.wordpress.org/trunk@27192 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-18 21:44:14 +00:00
Drew Jaynes 1fcb6036ca Fixes for inline documentation for hooks in wp-comments-post.php.
Adds missing `@since` versions, spacing, and language tweaks.

See #26869, #25229, [25249].


git-svn-id: https://develop.svn.wordpress.org/trunk@27144 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-09 20:11:34 +00:00
Andrew Nacin 37d92f4851 Short descriptions for inline docs should end with a period, per the vast majority of core. see #25229.
git-svn-id: https://develop.svn.wordpress.org/trunk@25273 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-06 01:37:59 +00:00
Andrew Nacin 48a9274146 Fixes for hook inline docs in wp-comments-post.php. see #25229.
git-svn-id: https://develop.svn.wordpress.org/trunk@25251 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-05 16:11:34 +00:00
Andrew Nacin 7a5e1a598f Inline documentation for hooks in wp-comments-post.php.
props rzen.
see #25229.


git-svn-id: https://develop.svn.wordpress.org/trunk@25249 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-05 16:04:17 +00:00
Jon Cave 8d72fd31d4 Initialize kses filters if _wp_unfiltered_html_comment nonce isn't set.
See #24752.


git-svn-id: https://develop.svn.wordpress.org/trunk@25137 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-27 13:56:17 +00:00
Sergey Biryukov 5615aef0bf Avoid an undefined index notice when submitting a comment with JavaScript disabled. fixes #24752.
git-svn-id: https://develop.svn.wordpress.org/trunk@25121 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-26 15:39:12 +00:00
Andrew Nacin b43712e0f7 New develop.svn.wordpress.org repository based on the old core.svn repository.
* All WordPress files move to a src/ directory.
 * New task runner (Grunt), configured to copy a built WordPress to build/.
 * svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js.
 * Remove Akismet external from develop.svn. Still exists in core.svn.
 * Drop minified files from src/. The build process will now generate these.

props koop.
see #24976.

and see http://wp.me/p2AvED-1AI.



git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-07 05:25:25 +00:00