We use add_metadata() function vs add_post_meta() here to allow for a revision post target OR regular post. add_metadata( 'post', $target_post_id, $meta_key, wp_slash( $meta_value ) );
$post_type
Sortie :
@param string $post_type The post type being revisioned. @return array An array of meta keys to be revisioned.
// Utilisation de la fonction wp_post_revision_meta_keys
$result = wp_post_revision_meta_keys($post_type);
if ($result) {
// Votre logique ici
}
Chargement des actualités...