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:117add_metadata() Source View on Trac ↗ View on GitHub ↗
111 * @since 3.1 .0 112 * 113 * @param int $object_id ID of the object metadata is for . 114 * @param string $meta_key Metadata key. 115 * @param mixed $_meta_value Metadata value. 116 * / 117 do_action ( "add_{ $meta_type } _meta" , $object_id , $meta_key , $_meta_value ) ; 118 119 $result = $wpdb -> insert ( 120 $table , 121 array ( 122 $column => $object_id , 123 '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.7.7 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.