Fires immediately before updating metadata of a specific type. 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: - `update_blog_meta` - `update_post_meta` - `update_comment_meta` - `update_term_meta` - `update_user_meta`
$meta_id, $object_id, $meta_key, $_meta_value
Sortie :
@param int $meta_id ID of the metadata entry to 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 'update_{$meta_type}_meta'
add_action('update_{$meta_type}_meta', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($meta_id, $object_id, $meta_key, $_meta_value) {
// Votre code ici
error_log('Hook update_{$meta_type}_meta déclenché');
}
Chargement des actualités...