WP HOOKS
akcjaod 5.1.0

wp_validate_site_data

Args 3Plik wp-includes/ms-site.phpDokumentacja WP ↗

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

ParametrTypOpis
$errors\WP_ErrorError object to add validation errors to.
$dataarrayAssociative array of complete site data. See {@see \wp_insert_site()} for the included data.
$old_site\WP_Site | nullThe 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
}