WordPress/wp-includes/rest-api
Dion Hulse 6738759b0c REST API: Treat any falsy value as `false` in 'rest_allow_anonymous_comments'.
Extend the check in 'rest_allow_anonymous_comments' to accept any falsy value (previously this was an explicit check for `false`).

One possible failure case is that a plugin developer forgets to include a return value for some code path in their callback for this filter, leading to a value of null which is currently treated like `true`.

Props joehoyle, jnylen0.
Merges [39487] to the 4.7 branch.
Fixes #39010.

Built from https://develop.svn.wordpress.org/branches/4.7@39566


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 01:40:32 +00:00
..
endpoints REST API: Treat any falsy value as `false` in 'rest_allow_anonymous_comments'. 2016-12-12 01:40:32 +00:00
fields REST API: Return a `WP_Error` if `meta` property is not an array. 2016-12-02 22:05:35 +00:00
class-wp-rest-request.php REST API: Only provide JSON error code on PHP 5.3+. 2016-11-03 04:57:30 +00:00
class-wp-rest-response.php DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:50:33 +00:00
class-wp-rest-server.php Text Changes: Merge some duplicate strings with the same meaning in error messages, adjust some other strings for consistency and accuracy. 2016-11-17 15:53:33 +00:00