WP HOOKS
filtrod 3.6.0

wp_save_post_revision_check_for_changes

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

Opis — z kodu źródłowego

Filters whether the post has changed since the latest revision.

By default a revision is saved only if one of the revisioned fields has changed. This filter can override that so a revision is saved even if nothing has changed.

Parametry

ParametrTypOpis
$check_for_changesboolWhether to check for changes before saving a new revision. Default true.
$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_check_for_changes', 'twoja_funkcja', 10, 3 );

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

Popularne w tej kategorii