Ticket #50413: 50413.3.diff
File 50413.3.diff, 3.5 KB (added by , 3 years ago) |
---|
-
src/js/_enqueues/wp/password-strength-meter.js
6 6 window.wp = window.wp || {}; 7 7 8 8 (function($){ 9 var __ = wp.i18n.__, 10 sprintf = wp.i18n.sprintf; 9 11 10 12 /** 11 13 * Contains functions to determine the password strength. … … 58 60 * @return {string[]} The array of words to be disallowed. 59 61 */ 60 62 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 ); 66 72 67 73 return wp.passwordStrength.userInputDisallowedList(); 68 74 }, -
src/wp-admin/includes/plugin.php
2154 2154 global $new_whitelist_options; 2155 2155 2156 2156 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 ); 2158 2158 } 2159 2159 2160 2160 return $options; … … 2171 2171 * @param string|array $options 2172 2172 * @return array 2173 2173 */ 2174 function add_ option_allowed_list( $new_options, $options = '' ) {2174 function add_allowed_options( $new_options, $options = '' ) { 2175 2175 if ( '' === $options ) { 2176 2176 global $allowed_options; 2177 2177 } else { -
src/wp-includes/deprecated.php
4042 4042 * Adds an array of options to the list of allowed options. 4043 4043 * 4044 4044 * @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. 4046 4046 * Please consider writing more inclusive code. 4047 4047 * 4048 4048 * @global array $allowed_options … … 4052 4052 * @return array 4053 4053 */ 4054 4054 function 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()' ); 4056 4056 4057 return add_ option_allowed_list( $new_options, $options );4057 return add_allowed_options( $new_options, $options ); 4058 4058 } 4059 4059 4060 4060 /** -
src/wp-includes/script-loader.php
1064 1064 ) 1065 1065 ); 1066 1066 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 ); 1068 1068 did_action( 'init' ) && $scripts->localize( 1069 1069 'password-strength-meter', 1070 1070 'pwsL10n',