Make WordPress Core


Ignore:
Timestamp:
06/23/2020 06:53:00 PM (4 years ago)
Author:
desrosj
Message:

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.

File:
1 edited

Legend:

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

    r48121 r48142  
    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
     
    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;
Note: See TracChangeset for help on using the changeset viewer.