WP HOOKS
filtrod 6.9.0

post_states_html

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

Opis — z kodu źródłowego

Filters the HTML string of post states.

Parametry

ParametrTypOpis
$post_states_htmlstringAll relevant post states combined into an HTML string for display. E.g. <code>&amp;mdash; &lt;span class='post-state'&gt;Draft, &lt;/span&gt;&lt;span class='post-state'&gt;Sticky&lt;/span&gt;</code>.
$post_statesarray<string,string>A mapping of post state slugs to translated post state labels. E.g. <code>array( 'draft' =&gt; __( 'Draft' ), 'sticky' =&gt; __( 'Sticky' ), ... )</code>.
$post\WP_PostThe 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
}

Popularne w tej kategorii