filtrod 4.4.0
postmeta_form_keys
Opis — z kodu źródłowego
Filters values for the meta key dropdown in the Custom Fields meta box.
Returning a non-null value will effectively short-circuit and avoid a potentially expensive query against postmeta.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$keys | array | null | Pre-defined meta keys to be used in place of a postmeta query. Default null. |
$post | \WP_Post | The current post object. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'postmeta_form_keys', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'postmeta_form_keys', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii