WP HOOKS
akcjadynamicznyod 3.0.0

add_meta_boxes_{$post_type}

Args 1Plik wp-admin/includes/meta-boxes.php

Opis — z kodu źródłowego

Fires after all built-in meta boxes have been added, contextually for the given post type.

The dynamic portion of the hook name, $post_type, refers to the post type of the post. Possible hook names include:

  • add_meta_boxes_post
  • add_meta_boxes_page
  • add_meta_boxes_attachment

Hook dynamiczny — możliwe nazwy

add_meta_boxes_attachmentadd_meta_boxes_pageadd_meta_boxes_post

Parametry

ParametrTypOpis
$post\WP_PostPost object.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_action( 'add_meta_boxes_{$post_type}', 'twoja_funkcja' );

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

Popularne w tej kategorii