option_update_filter

The timeline below displays how wordpress function option_update_filter has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.5

/* Allowed list functions */
/**
 * Refreshes the value of the allowed options list available via the 'allowed_options' hook.
 *
 * See the {@see 'allowed_options'} filter.
 *
 * @since 2.7.0
 * @since 5.5.0 `$new_whitelist_options` was renamed to `$new_allowed_options`.
 *              Please consider writing more inclusive code.
 *
 * @global array $new_allowed_options
 *
 * @param array $options
 * @return array
 */
function option_update_filter($options)
{
    global $new_allowed_options;
    if (is_array($new_allowed_options)) {
        $options = add_allowed_options($new_allowed_options, $options);
    }
    return $options;
}

WordPress Version: 4.7

/* Whitelist functions */
/**
 * Refreshes the value of the options whitelist available via the 'whitelist_options' hook.
 *
 * See the {@see 'whitelist_options'} filter.
 *
 * @since 2.7.0
 *
 * @global array $new_whitelist_options
 *
 * @param array $options
 * @return array
 */
function option_update_filter($options)
{
    global $new_whitelist_options;
    if (is_array($new_whitelist_options)) {
        $options = add_option_whitelist($new_whitelist_options, $options);
    }
    return $options;
}

WordPress Version: 4.6

/**
 * Refreshes the value of the options whitelist available via the 'whitelist_options' hook.
 *
 * See the {@see 'whitelist_options'} filter.
 *
 * @since 2.7.0
 *
 * @global array $new_whitelist_options
 *
 * @param array $options
 * @return array
 */
function option_update_filter($options)
{
    global $new_whitelist_options;
    if (is_array($new_whitelist_options)) {
        $options = add_option_whitelist($new_whitelist_options, $options);
    }
    return $options;
}

WordPress Version: 4.4

/**
 * Refreshes the value of the options whitelist available via the 'whitelist_options' filter.
 *
 * @since 2.7.0
 *
 * @global array $new_whitelist_options
 *
 * @param array $options
 * @return array
 */
function option_update_filter($options)
{
    global $new_whitelist_options;
    if (is_array($new_whitelist_options)) {
        $options = add_option_whitelist($new_whitelist_options, $options);
    }
    return $options;
}

WordPress Version: 4.3

/**
 * {@internal Missing Short Description}}
 *
 * @since 2.7.0
 *
 * @global array $new_whitelist_options
 *
 * @param array $options
 * @return array
 */
function option_update_filter($options)
{
    global $new_whitelist_options;
    if (is_array($new_whitelist_options)) {
        $options = add_option_whitelist($new_whitelist_options, $options);
    }
    return $options;
}

WordPress Version: 4.1

/**
 * {@internal Missing Short Description}}
 *
 * @since 2.7.0
 *
 * @param array $options
 * @return array
 */
function option_update_filter($options)
{
    global $new_whitelist_options;
    if (is_array($new_whitelist_options)) {
        $options = add_option_whitelist($new_whitelist_options, $options);
    }
    return $options;
}

WordPress Version: 3.7

/**
 * {@internal Missing Short Description}}
 *
 * @since 2.7.0
 *
 * @param unknown_type $options
 * @return unknown
 */
function option_update_filter($options)
{
    global $new_whitelist_options;
    if (is_array($new_whitelist_options)) {
        $options = add_option_whitelist($new_whitelist_options, $options);
    }
    return $options;
}