Commit dcd149a
committed
Code Quality: Remove an always-true check when scheduling a Customizer changeset.
In `WP_Customize_Manager::save_changeset_post()`, a changeset with a `date_gmt` that is not in the future is rejected with a `not_future_date` error.
The check that follows can therefore only be reached with `$is_future_dated` set to `true`, so the `'future' === $args['status'] || $is_future_dated` part of its condition always evaluates to `true`. The condition is reduced to the `is_theme_active()` check that actually decides it. There is no change in behavior.
This resolves the only error in the `booleanOr.rightAlwaysTrue` PHPStan baseline, which is deleted.
Follow-up to r39409.
Props Soean, mukesh27.
See #65817.
git-svn-id: https://develop.svn.wordpress.org/trunk@64082 602fd350-edb4-49c9-b593-d223f7449a821 parent 66d4890 commit dcd149a
3 files changed
Lines changed: 1 addition & 27 deletions
File tree
- src/wp-includes
- tests/phpstan/baselines
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2687 | 2687 | | |
2688 | 2688 | | |
2689 | 2689 | | |
2690 | | - | |
| 2690 | + | |
2691 | 2691 | | |
2692 | 2692 | | |
2693 | 2693 | | |
| |||
This file was deleted.
0 commit comments