General: Rename (add|remove)_option_allowed_list() to (add|remove)_allowed_option().

The new names make the purpose more clear. It also adds consistency with the `$allowed_options` global variable.

Also in this change, the `wp-deprecated` dependency has been removed from the password strength meter in favor of a `window.console.log()` call to avoid adding 3 dependencies for one deprecated notice.

Props SergeyBiryukov, ocean90, desrosj
Fixes #50413.
Built from https://develop.svn.wordpress.org/trunk@48142


git-svn-id: http://core.svn.wordpress.org/trunk@47911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj
2020-06-23 18:54:16 +00:00
parent 6cf2f816f0
commit c5b1a12a55
6 changed files with 19 additions and 13 deletions

View File

@@ -2154,7 +2154,7 @@ function option_update_filter( $options ) {
global $new_whitelist_options;
if ( is_array( $new_whitelist_options ) ) {
$options = add_option_allowed_list( $new_whitelist_options, $options );
$options = add_allowed_options( $new_whitelist_options, $options );
}
return $options;
@@ -2171,7 +2171,7 @@ function option_update_filter( $options ) {
* @param string|array $options
* @return array
*/
function add_option_allowed_list( $new_options, $options = '' ) {
function add_allowed_options( $new_options, $options = '' ) {
if ( '' === $options ) {
global $allowed_options;
} else {