WP HOOKS
akcjadynamicznyod 3.4.0

delete_{$meta_type}meta

Args 1Plik wp-includes/meta.php

Opis — z kodu źródłowego

Fires immediately before deleting post or comment metadata of a specific type.

The dynamic portion of the hook name, $meta_type, refers to the meta object type (post or comment). Possible hook names include:

  • delete_postmeta
  • delete_commentmeta

Hook dynamiczny — możliwe nazwy

delete_commentmetadelete_postmeta

Parametry

ParametrTypOpis
$meta_idintID of the metadata entry to delete.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_action( 'delete_{$meta_type}meta', 'twoja_funkcja' );

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