WP HOOKS
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_post
  • post_type_labels_page
  • post_type_labels_attachment

Hook dynamiczny — możliwe nazwy

post_type_labels_attachmentpost_type_labels_pagepost_type_labels_post

Parametry

ParametrTypOpis
$labelsobjectObject 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
}

Popularne w tej kategorii