Make WordPress Core


Ignore:
Timestamp:
12/12/2016 01:39:13 AM (8 years ago)
Author:
dd32
Message:

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.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.