WP HOOKS
filtrod 2.8.0

display_post_states

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

Opis — z kodu źródłowego

Filters the default post display states used in the posts list table.

Parametry

ParametrTypOpis
$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( 'display_post_states', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii