filtrdynamicznyod 3.5.0
post_type_labels_{$post_type}
Args 1Plik wp-includes/post.php
Opis — z kodu źródłowego
Filters the labels of a specific post type.
The dynamic portion of the hook name, $post_type, refers to the post type slug.
Possible hook names include:
post_type_labels_postpost_type_labels_pagepost_type_labels_attachment
Hook dynamiczny — możliwe nazwy
post_type_labels_attachmentpost_type_labels_pagepost_type_labels_postParametry
| Parametr | Typ | Opis |
|---|---|---|
$labels | object | Object with labels for the post type as member variables. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'post_type_labels_{$post_type}', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}
// rejestracja funkcji zwrotnej
add_filter( 'post_type_labels_{$post_type}', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii