Make WordPress Core

Ticket #50392: 50392.2.diff

File 50392.2.diff, 1.3 KB (added by Chouby, 5 years ago)
  • src/wp-admin/includes/misc.php

    diff --git a/src/wp-admin/includes/misc.php b/src/wp-admin/includes/misc.php
    index d2103f45b7..b5eb1ecd7d 100644
    a b function set_screen_options() { 
    688688                                }
    689689                                break;
    690690                        default:
     691                                $_value = false;
     692
    691693                                if ( '_page' === substr( $option, -5 ) || 'layout_columns' === $option ) {
    692694                                        /**
    693695                                         * Filters a screen option value before it is set.
    function set_screen_options() { 
    708710                                         * @param string $option The option name.
    709711                                         * @param int    $value  The number of rows to use.
    710712                                         */
    711                                         $value = apply_filters( 'set-screen-option', false, $option, $value ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
     713                                        $_value = apply_filters( 'set-screen-option', $_value, $option, $value ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    712714                                }
    713715
    714716                                /**
    function set_screen_options() { 
    727729                                 * @param string $option The option name.
    728730                                 * @param int    $value  The number of rows to use.
    729731                                 */
    730                                 $value = apply_filters( "set_screen_option_{$option}", false, $option, $value );
     732                                $value = apply_filters( "set_screen_option_{$option}", $_value, $option, $value );
    731733
    732734                                if ( false === $value ) {
    733735                                        return;