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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48142 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers
2020-06-23 18:53:00 +00:00
parent 5f6ab44340
commit 19c9963d9d
4 changed files with 17 additions and 11 deletions
+2 -2
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 {