In sanitize_option()
, pass the unsanitized $value
to the filter.
Props simonwheatley, MikeHansenMe. Fixes #26199. git-svn-id: https://develop.svn.wordpress.org/trunk@32520 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
15a0c621ea
commit
5de66efda6
@ -3328,6 +3328,8 @@ function wp_make_link_relative( $link ) {
|
|||||||
function sanitize_option($option, $value) {
|
function sanitize_option($option, $value) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
|
$original_value = $value;
|
||||||
|
|
||||||
switch ( $option ) {
|
switch ( $option ) {
|
||||||
case 'admin_email' :
|
case 'admin_email' :
|
||||||
case 'new_admin_email' :
|
case 'new_admin_email' :
|
||||||
@ -3515,11 +3517,13 @@ function sanitize_option($option, $value) {
|
|||||||
* Filter an option value following sanitization.
|
* Filter an option value following sanitization.
|
||||||
*
|
*
|
||||||
* @since 2.3.0
|
* @since 2.3.0
|
||||||
|
* @since 4.3.0 Added the `$original_value` parameter.
|
||||||
*
|
*
|
||||||
* @param string $value The sanitized option value.
|
* @param string $value The sanitized option value.
|
||||||
* @param string $option The option name.
|
* @param string $option The option name.
|
||||||
|
* @param string $original_value The original value passed to the function.
|
||||||
*/
|
*/
|
||||||
$value = apply_filters( "sanitize_option_{$option}", $value, $option );
|
$value = apply_filters( "sanitize_option_{$option}", $value, $option, $original_value );
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user