Make WordPress Core


Ignore:
Timestamp:
07/14/2020 12:31:22 PM (4 years ago)
Author:
desrosj
Message:

General: Rename the $new_whitelist_options global variable.

This change renames $new_whitelist_options to $new_allowed_options. This makes the variable’s purpose more clear, and promotes using more inclusive language.

For backwards compatibility, the new variable is passed by reference to the old one.

Follow up to [48121].

Props ayeshrajans, desrosj, jorbin, SergeyBiryukov.
See #50413.
Fixes #50434.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin.php

    r48326 r48477  
    21682168 *
    21692169 * @since 2.7.0
    2170  *
    2171  * @global array $new_whitelist_options
     2170 * @since 5.5.0 `$new_whitelist_options` was renamed to `$new_allowed_options`.
     2171 *              Please consider writing more inclusive code.
     2172 *
     2173 * @global array $new_allowed_options
    21722174 *
    21732175 * @param array $options
     
    21752177 */
    21762178function option_update_filter( $options ) {
    2177     global $new_whitelist_options;
    2178 
    2179     if ( is_array( $new_whitelist_options ) ) {
    2180         $options = add_allowed_options( $new_whitelist_options, $options );
     2179    global $new_allowed_options;
     2180
     2181    if ( is_array( $new_allowed_options ) ) {
     2182        $options = add_allowed_options( $new_allowed_options, $options );
    21812183    }
    21822184
Note: See TracChangeset for help on using the changeset viewer.