Closed spacedmonkey closed 4 years ago
@kadamwhite All your feedback as been actioned.
I have tested and indeed it also fixes #38 .
Hey @spacedmonkey this is great! It's a big-ish PR I'd say.
Should all the new things in
prepare_item_for_database
be covered by new tests?
I know this PR is a got a little to large. It got a little out of hand. To stop it getting any bigger and become impossible to review, I have agree with the rest of the team to just get this merged and work on another PR with test. Hopefully this will make the code review process quicker and mean we don't get blocked like this again.
Going ahead and merging this. I'd really like to see tests for handling the negative menu item IDs and reordering.
Improved validation of saving and displaying fields. Now correct types are checks and fields sanitized.
Much of this code is copied from wp-cli. See this.
There is more sanitize found in the customizer here.
Also improved all interger values defaults and allowed values.
This PR validation against the following use cases.
Other changes.
Fixes #38