From c66d70f2a53f2c44646fc4d9333aed1b97be0c58 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 19 Aug 2020 01:59:04 +0000 Subject: [PATCH] Comments: Revert unintended changes from [48822]. See #51044. Built from https://develop.svn.wordpress.org/trunk@48823 git-svn-id: http://core.svn.wordpress.org/trunk@48585 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/misc.php | 42 +++++++++++++++++++------------------- wp-includes/version.php | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index 80e0b395ff..68cdd4800a 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -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,29 +710,27 @@ 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 { - /** - * Filters a screen option value before it is set. - * - * The dynamic portion of the hook, `$option`, refers to the option name. - * - * 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() - * - * @param mixed $screen_option The value to save instead of the option value. - * Default false (to skip saving the current option). - * @param string $option The option name. - * @param int $value The option value. - */ - $value = apply_filters( "set_screen_option_{$option}", false, $option, $value ); + $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. + * + * The dynamic portion of the hook, `$option`, refers to the option name. + * + * Returning false from the filter will skip saving the current option. + * + * @since 5.4.2 + * + * @see set_screen_options() + * + * @param mixed $screen_option The value to save instead of the option value. + * Default false (to skip saving the current option). + * @param string $option The option name. + * @param int $value The option value. + */ + $value = apply_filters( "set_screen_option_{$option}", $screen_option, $option, $value ); + if ( false === $value ) { return; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 8886fd83c9..7d6aeaebde 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-48822'; +$wp_version = '5.6-alpha-48823'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.