#50392 closed defect (bug) (fixed)
set-screen-option hook broken in 5.4.2
Reported by: | sswells | Owned by: | whyisjake |
---|---|---|---|
Milestone: | 5.4.3 | Priority: | normal |
Severity: | normal | Version: | 5.4.2 |
Component: | Administration | Keywords: | has-patch fixed-major |
Focuses: | Cc: |
Description
A value returned using the set-screen-option hook is being ignored. Take a look.
Line 711: $value = apply_filters( 'set-screen-option', false, $option, $value );
Line 730: $value = apply_filters( "set_screen_option_{$option}", false, $option, $value );
Line 730 should be:
apply_filters( "set_screen_option_{$option}", $value );
Attachments (2)
Change History (33)
#4
@
4 years ago
As a workaround until the issue is fixed, I'd recommend switching to the newer set_screen_option_{$option}
filter, which should work as expected.
#5
follow-up:
↓ 7
@
4 years ago
- Keywords has-patch removed
Just realized 50392.diff still won't work as expected. Will take another look.
#7
in reply to:
↑ 5
;
follow-up:
↓ 11
@
4 years ago
Replying to SergeyBiryukov:
Just realized 50392.diff still won't work as expected. Will take another look.
I propose you this new patch 50392.2.diff
As the issue was introduced by 5.4.2, I suppose that it's present in all minor versions updated at the same time. Am I right?
This ticket was mentioned in Slack in #core by whyisjake. View the logs.
4 years ago
This ticket was mentioned in Slack in #forums by joyously. View the logs.
4 years ago
#11
in reply to:
↑ 7
@
4 years ago
Replying to Chouby:
I propose you this new patch 50392.2.diff
That looks good, thanks!
As the issue was introduced by 5.4.2, I suppose that it's present in all minor versions updated at the same time. Am I right?
Yes, the fix would need to be backported to all the branches starting with 3.7.
Hi there, welcome back to WordPress Trac!
Good catch, thanks for the report. I think the preferred fix here would be to return after
set-screen-option
if the value is unchanged, same as before 5.4.2. See 50392.diff.