filtrod 2.8.0
display_post_states
Opis — z kodu źródłowego
Filters the default post display states used in the posts list table.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$post_states | array<string,string> | A mapping of post state slugs to translated post state labels. E.g. <code>array( 'draft' => __( 'Draft' ), 'sticky' => __( 'Sticky' ), ... )</code>. |
$post | \WP_Post | The current post object. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'display_post_states', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'display_post_states', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii