WP HOOKS
filtrod 4.1.0

wp_save_post_revision_post_has_changed

Args 3Plik wp-includes/revision.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters whether a post has changed.

By default a revision is saved only if one of the revisioned fields has changed. This filter allows for additional checks to determine if there were changes.

Parametry

ParametrTypOpis
$post_has_changedboolWhether the post has changed.
$latest_revision\WP_PostThe latest revision post object.
$post\WP_PostThe post object.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_save_post_revision_post_has_changed', 'twoja_funkcja', 10, 3 );

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

Popularne w tej kategorii