delete_{$meta_type}meta WordPress Action Hook

The delete_{$meta_type}meta hook is triggered when a metadata value is deleted. It allows you to take an action when a metadata value is deleted. The hook takes two arguments: the meta ID and the post ID.

do_action( "delete_{$meta_type}meta", int $meta_id ) #

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


Description

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
  • delete_termmeta
  • delete_usermeta

Top ↑

Parameters

$meta_id

(int)ID of the metadata entry to delete.


Top ↑

Source

File: wp-includes/meta.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.