Pre-filters captured option values before updating.
Parameters
$new_value
mixedrequired- The new option value.
$option_name
stringrequired- Name of the option.
$old_value
mixedrequired- The old option value.
Source
public function capture_filter_pre_update_option( $new_value, $option_name, $old_value ) {
if ( $this->is_option_capture_ignored( $option_name ) ) {
return $new_value;
}
if ( ! isset( $this->_captured_options[ $option_name ] ) ) {
add_filter( "pre_option_{$option_name}", array( $this, 'capture_filter_pre_get_option' ) );
}
$this->_captured_options[ $option_name ] = $new_value;
return $old_value;
}
Changelog
Version | Description |
---|---|
3.9.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.