wp_post_revision_meta_keys

FUNCTION wp-includes\revision.php (ligne 544) github
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 ) );

Paramètres

Entrée :
$post_type
Sortie :
@param string $post_type The post type being revisioned.
@return array An array of meta keys to be revisioned.

Utilisation

// Utilisation de la fonction wp_post_revision_meta_keys
$result = wp_post_revision_meta_keys($post_type);

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...