deleted_{$meta_type}_meta

deleted_{$meta_type}_meta

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

do_action('deleted_{$meta_type}_meta') is found 2 times:

  • /wp-includes/meta.php line 528
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    * @param int      $object_id   ID of the object metadata is for.
     * @param string   $meta_key    Metadata key.
     * @param mixed    $_meta_value Metadata value.
     */
    do_action( "deleted_{$meta_type}_meta", $meta_ids, $object_id, $meta_key, $_meta_value );
     
    // Old-style action.
    if ( 'post' === $meta_type ) {
        /**
         * Fires immediately after deleting metadata for a post.
         *
  • /wp-includes/meta.php line 1068
    1064
    1065
    1066
    1067
    1068
    1069
    1070
    1071
    1072
    1073
    1074
    // Clear the caches.
    wp_cache_delete( $object_id, $meta_type . '_meta' );
     
    /** This action is documented in wp-includes/meta.php */
    do_action( "deleted_{$meta_type}_meta", (array) $meta_id, $object_id, $meta->meta_key, $meta->meta_value );
     
    // Old-style action.
    if ( 'post' === $meta_type || 'comment' === $meta_type ) {
        /**
         * Fires immediately after deleting post or comment metadata of a specific type.
         *

See this hook used in plugins: