filtrod 3.6.0
wp_revisions_to_keep
Opis — z kodu źródłowego
Filters the number of revisions to save for the given post.
Overrides the value of WP_POST_REVISIONS.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$num | int | Number of revisions to store. |
$post | \WP_Post | Post object. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_revisions_to_keep', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_revisions_to_keep', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii