WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
446 |
|
447 | /** |
448 | * Filters passed site data in order to normalize it. |
449 | * |
450 | * @since 5.1.0 |
451 | * |
452 | * @param array $data Associative array of site data passed to the respective function. |
453 | * See {@see wp_insert_site()} for the possibly included data. |
454 | */ |
455 | $data = apply_filters( 'wp_normalize_site_data', $data ); |
456 |
|
457 | $allowed_data_fields = array( 'domain', 'path', 'network_id', 'registered', 'last_updated', 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id' ); |
458 | $data = array_intersect_key( wp_parse_args( $data, $defaults ), array_flip( $allowed_data_fields ) ); |
459 |
|
460 | $errors = new WP_Error(); |
461 |
|
462 | /** |
463 | * Fires when data should be validated for a site prior to inserting or updating in the database. |
464 | * |