Reference › Hooks do_action( "add_{$meta_type}_meta" , int $object_id , string $meta_key , mixed $_meta_value )
Since 3.1.0 Description Parameters Fired at Source History Fires immediately before meta of a specific type is added.
Description The dynamic portion of the hook name, $meta_type, refers to the meta object type (post, comment, term, user, or any other type with an associated meta table). Possible hook names include: <ul> <li>add_post_meta</li> <li>add_comment_meta</li> <li>add_term_meta</li> <li>add_user_meta</li> </ul>
Parameters
$object_idint ID of the object metadata is for.
$meta_keystring Metadata key.
$_meta_valuemixed Metadata value. Fired at · 1 wp-includes/meta.php:123add_metadata() Source View on Trac ↗ View on GitHub ↗
117 * @since 3.1 .0 118 * 119 * @param int $object_id ID of the object metadata is for . 120 * @param string $meta_key Metadata key. 121 * @param mixed $_meta_value Metadata value. 122 * / 123 do_action ( "add_{ $meta_type } _meta" , $object_id , $meta_key , $_meta_value ) ; 124 125 $result = $wpdb -> insert ( 126 $table , 127 array ( 128 $column => $object_id , 129 'meta_key' => $meta_key , History Introduced in 3.1.0 . Unchanged from 6.7.7 through 7.1.0.
6.7.7 6.8.8 6.9.7 7.0.4 7.1.0 Signature, return type and hooks compared across 5 parsed releases.
About this page Parsed data Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. Corrections Something wrong on this page? Report it and it gets fixed in the next regeneration.