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 |
---|---|
471 | * |
472 | * @since 5.1.0 |
473 | * |
474 | * @param WP_Error $errors Error object to add validation errors to. |
475 | * @param array $data Associative array of complete site data. See {@see wp_insert_site()} |
476 | * for the included data. |
477 | * @param WP_Site|null $old_site The old site object if the data belongs to a site being updated, |
478 | * or null if it is a new site being inserted. |
479 | */ |
480 | do_action( 'wp_validate_site_data', $errors, $data, $old_site ); |
481 |
|
482 | if ( ! empty( $errors->errors ) ) { |
483 | return $errors; |
484 | } |
485 |
|
486 | // Prepare for database. |
487 | $data['site_id'] = $data['network_id']; |
488 | unset( $data['network_id'] ); |
489 |
|