Fires immediately after meta of a specific type is added. The dynamic portion of the hook name, `$meta_type`, refers to the meta object type (blog, post, comment, term, user, or any other type with an associated meta table). Possible hook names include: - `added_blog_meta` - `added_post_meta` - `added_comment_meta` - `added_term_meta` - `added_user_meta`
$mid, $object_id, $meta_key, $_meta_value
Sortie :
@param int $mid The meta ID after successful update. @param int $object_id ID of the object metadata is for. @param string $meta_key Metadata key. @param mixed $_meta_value Metadata value.
// Ajouter une fonction au hook action 'added_{$meta_type}_meta'
add_action('added_{$meta_type}_meta', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($mid, $object_id, $meta_key, $_meta_value) {
// Votre code ici
error_log('Hook added_{$meta_type}_meta déclenché');
}
Chargement des actualités...