Make WordPress Core

Ticket #50413: 50413.3.diff

File 50413.3.diff, 3.5 KB (added by desrosj, 3 years ago)
  • src/js/_enqueues/wp/password-strength-meter.js

     
    66window.wp = window.wp || {};
    77
    88(function($){
     9        var __ = wp.i18n.__,
     10                sprintf = wp.i18n.sprintf;
    911
    1012        /**
    1113         * Contains functions to determine the password strength.
     
    5860                 * @return {string[]} The array of words to be disallowed.
    5961                 */
    6062                userInputBlacklist : function() {
    61                         wp.deprecated( 'wp.passwordStrength.userInputBlacklist()', {
    62                                 alternative: 'wp.passwordStrength.userInputDisallowedList()',
    63                                 plugin: 'WordPress',
    64                                 hint: wp.i18n.__( 'Please consider writing more inclusive code.' )
    65                         } );
     63                        window.console.log(
     64                                sprintf(
     65                                        /* translators: 1: Deprecated  JSfunction name, 2: Version number, 3: Alternative function name. */
     66                                        __( '%1$s is deprecated since version %2$s! Use %3$s instead. Please consider writing more inclusive code.' ),
     67                                        'wp.passwordStrength.userInputBlacklist()',
     68                                        '5.5.0',
     69                                        'wp.passwordStrength.userInputDisallowedList()'
     70                                )
     71                        );
    6672
    6773                        return wp.passwordStrength.userInputDisallowedList();
    6874                },
  • src/wp-admin/includes/plugin.php

     
    21542154        global $new_whitelist_options;
    21552155
    21562156        if ( is_array( $new_whitelist_options ) ) {
    2157                 $options = add_option_allowed_list( $new_whitelist_options, $options );
     2157                $options = add_allowed_options( $new_whitelist_options, $options );
    21582158        }
    21592159
    21602160        return $options;
     
    21712171 * @param string|array $options
    21722172 * @return array
    21732173 */
    2174 function add_option_allowed_list( $new_options, $options = '' ) {
     2174function add_allowed_options( $new_options, $options = '' ) {
    21752175        if ( '' === $options ) {
    21762176                global $allowed_options;
    21772177        } else {
  • src/wp-includes/deprecated.php

     
    40424042 * Adds an array of options to the list of allowed options.
    40434043 *
    40444044 * @since 2.7.0
    4045  * @deprecated 5.5.0 Use add_option_allowed_list() instead.
     4045 * @deprecated 5.5.0 Use add_allowed_options() instead.
    40464046 *                   Please consider writing more inclusive code.
    40474047 *
    40484048 * @global array $allowed_options
     
    40524052 * @return array
    40534053 */
    40544054function add_option_whitelist( $new_options, $options = '' ) {
    4055         _deprecated_function( __FUNCTION__, '5.5.0', 'add_option_allowed_list()' );
     4055        _deprecated_function( __FUNCTION__, '5.5.0', 'add_allowed_options()' );
    40564056
    4057         return add_option_allowed_list( $new_options, $options );
     4057        return add_allowed_options( $new_options, $options );
    40584058}
    40594059
    40604060/**
  • src/wp-includes/script-loader.php

     
    10641064                )
    10651065        );
    10661066
    1067         $scripts->add( 'password-strength-meter', "/wp-admin/js/password-strength-meter$suffix.js", array( 'jquery', 'wp-deprecated', 'zxcvbn-async' ), false, 1 );
     1067        $scripts->add( 'password-strength-meter', "/wp-admin/js/password-strength-meter$suffix.js", array( 'jquery', 'zxcvbn-async' ), false, 1 );
    10681068        did_action( 'init' ) && $scripts->localize(
    10691069                'password-strength-meter',
    10701070                'pwsL10n',