WordPress.org

Make WordPress Core

Ticket #20804: sanitize_option.patch

File sanitize_option.patch, 785 bytes (added by chokladzingo, 23 months ago)
  • wp-admin/includes/plugin.php

     
    16291629 
    16301630        $new_whitelist_options[ $option_group ][] = $option_name; 
    16311631        if ( $sanitize_callback != '' ) 
    1632                 add_filter( "sanitize_option_{$option_name}", $sanitize_callback ); 
     1632                add_filter( "sanitize_option_{$option_name}", $sanitize_callback, 10, 2 ); 
    16331633} 
    16341634 
    16351635/** 
     
    16541654        if ( $pos !== false ) 
    16551655                unset( $new_whitelist_options[ $option_group ][ $pos ] ); 
    16561656        if ( $sanitize_callback != '' ) 
    1657                 remove_filter( "sanitize_option_{$option_name}", $sanitize_callback ); 
     1657                remove_filter( "sanitize_option_{$option_name}", $sanitize_callback, 10, 2 ); 
    16581658} 
    16591659 
    16601660/**