WP HOOKS
filtrod 4.4.0

postmeta_form_keys

Args 2Plik wp-admin/includes/template.phpDokumentacja WP ↗

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

ParametrTypOpis
$keysarray | nullPre-defined meta keys to be used in place of a postmeta query. Default null.
$post\WP_PostThe 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
}

Popularne w tej kategorii