Closed kbrown9 closed 3 years ago
It looks like some of the tests are failing because, in WP 5.6, untrashed posts are returned to draft status.
Also add a unit test that verifies that update_option will change the value of an option that has a default value. Note that without this branch's change to Options::get_all_options, the new unit test should fail.
Yes, this was changed here: core.trac.wordpress.org/ticket/23022
What do you think? Should we simply update the test to reflect the latest behavior? or should we add a version check there?
Or even, should we add a test to the filter they left in wp_untrash_post
for folks who want to keep the old behavior?
should we add a version check there
Definitely.
Change the option array merge order in
Options::get_all_options
so that the$options
class property is merged last. This will allow tests to useupdate_option
to change the value of options that have a default value, such as the 'home' option.Also add a unit test that verifies that
update_option
will change the value of an option that has a default value. Note that without this branch's change toOptions::get_all_options
, the new unit test should fail.