wp_revisions_to_keep

FUNCTION wp-includes\revision.php (ligne 785) github
Determines how many revisions to retain for a given post. By default, an infinite number of revisions are kept. The constant WP_POST_REVISIONS can be set in wp-config to specify the limit of revisions to keep.

Paramètres

Entrée :
$post
Sortie :
@param WP_Post $post The post object.
@return int The number of revisions to keep.

Utilisation

// Utilisation de la fonction wp_revisions_to_keep
$result = wp_revisions_to_keep($post);

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

Actualités

Chargement des actualités...