filtrod 4.1.0
wp_save_post_revision_post_has_changed
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
| Parametr | Typ | Opis |
|---|---|---|
$post_has_changed | bool | Whether the post has changed. |
$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_post_has_changed', '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_post_has_changed', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii