WP HOOKS
akcjaod 1.5.0

wp_set_comment_status

Args 2Plik wp-includes/comment.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Fires immediately after transitioning a comment's status from one to another in the database and removing the comment from the object cache, but prior to all status transition hooks.

Parametry

ParametrTypOpis
$comment_idstringComment ID as a numeric string.
$comment_statusstringCurrent comment status. Possible values include 'hold', '0', 'approve', '1', 'spam', and 'trash'.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'wp_set_comment_status', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii