filtrod 3.0.0
pre_insert_term
Opis — z kodu źródłowego
Filters a term before it is sanitized and inserted into the database.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$term | string | \WP_Error | The term name to add, or a WP_Error object if there's an error. |
$taxonomy | string | Taxonomy slug. |
$args | array | string | Array or query string of arguments passed to wp_insert_term(). |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_insert_term', '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( 'pre_insert_term', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii