Only one sanitise hook is needed
This commit is contained in:
parent
afd3aa2fc7
commit
4b45812bac
|
@ -175,11 +175,6 @@ abstract class WC_Widget extends WP_Widget {
|
|||
* Sanitize the value of a setting.
|
||||
*/
|
||||
$instance[ $key ] = apply_filters( 'woocommerce_widget_settings_sanitize_option', $instance[ $key ], $new_instance, $key, $setting );
|
||||
|
||||
/**
|
||||
* Sanitize the value of a setting by its key.
|
||||
*/
|
||||
$instance[ $key ] = apply_filters( "woocommerce_widget_settings_sanitize_option_$key", $instance[ $key ], $new_instance, $key, $setting );
|
||||
}
|
||||
|
||||
$this->flush_widget_cache();
|
||||
|
@ -260,7 +255,7 @@ abstract class WC_Widget extends WP_Widget {
|
|||
|
||||
// Default: run an action
|
||||
default :
|
||||
do_action( 'woocommerce_widget_field_' . $setting['type'], $key, $setting, $class, $value, $instance );
|
||||
do_action( 'woocommerce_widget_field_' . $setting['type'], $key, $value, $setting, $instance );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue