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 |
---|---|
482 |
|
483 | /** |
484 | * Filters passed site data in order to normalize it. |
485 | * |
486 | * @since 5.1.0 |
487 | * |
488 | * @param array $data Associative array of site data passed to the respective function. |
489 | * See {@see wp_insert_site()} for the possibly included data. |
490 | */ |
491 | $data = apply_filters( 'wp_normalize_site_data', $data ); |
492 |
|
493 | $whitelist = array( 'domain', 'path', 'network_id', 'registered', 'last_updated', 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id' ); |
494 | $data = array_intersect_key( wp_parse_args( $data, $defaults ), array_flip( $whitelist ) ); |
495 |
|
496 | $errors = new WP_Error(); |
497 |
|
498 | /** |
499 | * Fires when data should be validated for a site prior to inserting or updating in the database. |
500 | * |