Ticket #38320: 38320.diff
File 38320.diff, 2.1 KB (added by , 8 years ago) |
---|
-
src/wp-includes/option.php
1217 1217 * 1218 1218 * @since 2.9.0 As 'pre_add_site_option_' . $key 1219 1219 * @since 3.0.0 1220 * @since 4.4.0 The `$option` parameter was added 1220 * @since 4.4.0 The `$option` parameter was added. 1221 * @since 4.7.0 The `$network_id` parameter was added. 1221 1222 * 1222 * @param mixed $value Value of network option. 1223 * @param string $option Option name. 1223 * @param mixed $value Value of network option. 1224 * @param string $option Option name. 1225 * @param int $network_id ID of the network. 1224 1226 */ 1225 $value = apply_filters( "pre_add_site_option_{$option}", $value, $option );1227 $value = apply_filters( "pre_add_site_option_{$option}", $value, $option, $network_id ); 1226 1228 1227 1229 $notoptions_key = "$network_id:notoptions"; 1228 1230 … … 1267 1269 * 1268 1270 * @since 2.9.0 As "add_site_option_{$key}" 1269 1271 * @since 3.0.0 1272 * @since 4.7.0 The `$network_id` parameter was added. 1270 1273 * 1271 * @param string $option Name of the network option. 1272 * @param mixed $value Value of the network option. 1274 * @param string $option Name of the network option. 1275 * @param mixed $value Value of the network option. 1276 * @param int $network_id ID of the network. 1273 1277 */ 1274 do_action( "add_site_option_{$option}", $option, $value );1278 do_action( "add_site_option_{$option}", $option, $value, $network_id ); 1275 1279 1276 1280 /** 1277 1281 * Fires after a network option has been successfully added. 1278 1282 * 1279 1283 * @since 3.0.0 1284 * @since 4.7.0 The `$network_id` parameter was added. 1280 1285 * 1281 * @param string $option Name of the network option. 1282 * @param mixed $value Value of the network option. 1286 * @param string $option Name of the network option. 1287 * @param mixed $value Value of the network option. 1288 * @param int $network_id ID of the network. 1283 1289 */ 1284 do_action( 'add_site_option', $option, $value );1290 do_action( 'add_site_option', $option, $value, $network_id ); 1285 1291 1286 1292 return true; 1287 1293 }