filtrod 3.6.0
wp_save_post_revision_check_for_changes
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
| Parametr | Typ | Opis |
|---|---|---|
$check_for_changes | bool | Whether to check for changes before saving a new revision. Default true. |
$latest_revision | \WP_Post | The latest revision post object. |
$post | \WP_Post | The 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
}
// 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