filtrod 6.9.0
post_states_html
Opis — z kodu źródłowego
Filters the HTML string of post states.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$post_states_html | string | All relevant post states combined into an HTML string for display. E.g. <code>&mdash; <span class='post-state'>Draft, </span><span class='post-state'>Sticky</span></code>. |
$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( 'post_states_html', '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( 'post_states_html', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii