Comments: Revert unintended changes from [48822].

See #51044.

git-svn-id: https://develop.svn.wordpress.org/trunk@48823 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-08-19 01:57:29 +00:00
parent 5f861293e6
commit 2b3bf40907

View File

@ -688,6 +688,8 @@ function set_screen_options() {
}
break;
default:
$screen_option = false;
if ( '_page' === substr( $option, -5 ) || 'layout_columns' === $option ) {
/**
* Filters a screen option value before it is set.
@ -708,8 +710,9 @@ function set_screen_options() {
* @param string $option The option name.
* @param int $value The option value.
*/
$value = apply_filters( 'set-screen-option', false, $option, $value ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
} else {
$screen_option = apply_filters( 'set-screen-option', $screen_option, $option, $value ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}
/**
* Filters a screen option value before it is set.
*
@ -718,8 +721,6 @@ function set_screen_options() {
* Returning false from the filter will skip saving the current option.
*
* @since 5.4.2
* @since 5.4.3 Only applied to options not ending with '_page',
* and not the 'layout_columns' option.
*
* @see set_screen_options()
*
@ -728,8 +729,7 @@ function set_screen_options() {
* @param string $option The option name.
* @param int $value The option value.
*/
$value = apply_filters( "set_screen_option_{$option}", false, $option, $value );
}
$value = apply_filters( "set_screen_option_{$option}", $screen_option, $option, $value );
if ( false === $value ) {
return;