syndication icon indicating copy to clipboard operation
syndication copied to clipboard

Ensure that the value 'off' is properly read as a false boolean.

Open wpscholar opened this issue 9 years ago • 0 comments

Currently, if a site has the default status of 'off' (disabled), the status in the sites list view shows 'enabled' as the status. This is due to checking if the non-empty string whose value is set to 'off' is falsey, which of course it is not. By running the string through filter_var() and using the FILTER_VALIDATE_BOOLEAN flag, we are able to ensure that strings are properly converted into booleans if the values are 'on' or 'off'.

wpscholar avatar Oct 11 '16 16:10 wpscholar