WP HOOKS
akcjadynamicznyod 2.9.0

deleted_{$meta_type}_meta

Args 4Plik wp-includes/meta.php

Opis — z kodu źródłowego

Fires immediately after deleting metadata of a specific type.

The dynamic portion of the hook name, $meta_type, refers to the meta object type (blog, post, comment, term, user, or any other type with an associated meta table). Possible hook names include:

  • deleted_blog_meta
  • deleted_post_meta
  • deleted_comment_meta
  • deleted_term_meta
  • deleted_user_meta

Hook dynamiczny — możliwe nazwy

deleted_blog_metadeleted_comment_metadeleted_post_metadeleted_term_metadeleted_user_meta

Parametry

ParametrTypOpis
$meta_idsstring[]An array of metadata entry IDs to delete.
$object_idintID of the object metadata is for.
$meta_keystringMetadata key.
$_meta_valuemixedMetadata value.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'deleted_{$meta_type}_meta', 'twoja_funkcja', 10, 4 );

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