Make WordPress Core

Changeset 32520


Ignore:
Timestamp:
05/21/2015 05:59:58 PM (9 years ago)
Author:
boonebgorges
Message:

In sanitize_option(), pass the unsanitized $value to the filter.

Props simonwheatley, MikeHansenMe.
Fixes #26199.

File:
1 edited

Legend:

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

    r32482 r32520  
    33293329    global $wpdb;
    33303330
     3331    $original_value = $value;
     3332
    33313333    switch ( $option ) {
    33323334        case 'admin_email' :
     
    35163518     *
    35173519     * @since 2.3.0
    3518      *
    3519      * @param string $value  The sanitized option value.
    3520      * @param string $option The option name.
     3520     * @since 4.3.0 Added the `$original_value` parameter.
     3521     *
     3522     * @param string $value          The sanitized option value.
     3523     * @param string $option         The option name.
     3524     * @param string $original_value The original value passed to the function.
    35213525     */
    3522     $value = apply_filters( "sanitize_option_{$option}", $value, $option );
     3526    $value = apply_filters( "sanitize_option_{$option}", $value, $option, $original_value );
    35233527
    35243528    return $value;
Note: See TracChangeset for help on using the changeset viewer.