apply_filters( "pre_update_site_option_{$option}", mixed $value, mixed $old_value, string $option, int $network_id )
- Since
- 2.9.0, 3.0.0, 4.4.0, 4.7.0
Filters a specific network option before its value is updated.
Description
The dynamic portion of the hook name, $option, refers to the option name.
Compatibility
- WordPress
- since 4.7.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$valuemixed- New value of the network option.
$old_valuemixed- Old value of the network option.
$optionstring- Option name.
$network_idint- ID of the network.
Where this hook fires · 1
wp-includes/option.php:2418update_network_option()
Source code
* * @param mixed $value New value of the network option. * @param mixed $old_value Old value of the network option. * @param string $option Option name. * @param int $network_id ID of the network. */ $value = apply_filters( "pre_update_site_option_{$option}", $value, $old_value, $option, $network_id ); /* * If the new and old values are the same, no need to update. * * Unserialized values will be adequate in most cases. If the unserialized * data differs, the (maybe) serialized data is checked to avoidChangelog
Introduced in 4.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
4.7.0
The
$network_id parameter was added.from the docblock4.4.0
The
$option parameter was added.from the docblock3.0.0
from the docblock
2.9.0
As 'pre_update_siteoption' . $keyfrom the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.