Make WordPress Core

Ticket #26199: 26199.diff

File 26199.diff, 615 bytes (added by simonwheatley, 11 years ago)

Adds the original value to the sanitize_option_* filter (now without my dirty test which breaks TwentyThirteen)

  • src/wp-includes/formatting.php

     
    28312831 * @return string Sanitized value.
    28322832 */
    28332833function sanitize_option($option, $value) {
     2834        $original_value = $value;
    28342835
    28352836        switch ( $option ) {
    28362837                case 'admin_email' :
     
    29942995                        break;
    29952996        }
    29962997
    2997         $value = apply_filters("sanitize_option_{$option}", $value, $option);
     2998        $value = apply_filters("sanitize_option_{$option}", $value, $option, $original_value);
    29982999
    29993000        return $value;
    30003001}