akcjaod 5.1.0
wp_validate_site_data
Opis — z kodu źródłowego
Fires when data should be validated for a site prior to inserting or updating in the database.
Plugins should amend the $errors object via its WP_Error::add() method.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$errors | \WP_Error | Error object to add validation errors to. |
$data | array | Associative array of complete site data. See {@see \wp_insert_site()} for the included data. |
$old_site | \WP_Site | null | The old site object if the data belongs to a site being updated, or null if it is a new site being inserted. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'wp_validate_site_data', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'wp_validate_site_data', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}