filtrdynamicznyod 2.3.0
{$field}_pre
Args 1Plik wp-includes/post.php
Opis — z kodu źródłowego
Filters the value of a specific post field before saving.
Only applied to post fields with a name which is not prefixed with post_.
The dynamic portion of the hook name, $field, refers to the post field name. Possible filter names include:
ID_precomment_status_preping_status_preto_ping_prepinged_preguid_premenu_order_precomment_count_pre
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$value | mixed | Value of the post field. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( '{$field}_pre', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}
// rejestracja funkcji zwrotnej
add_filter( '{$field}_pre', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii