Core Function
View Source on Trac ↗ wp_get_latest_revision_id_and_total_count()
wp_get_latest_revision_id_and_total_count( mixed $post = 0 ) Returns the latest revision ID and count of revisions for a post.
Parameters 1 required
| Name / Type | Description |
|---|---|
| (int | | WP_Post) $post Optional. Post ID or WP_Post object. Default is global $post. Required |
Return Value
((array)
(array | WP_Error) {
Returns associative array with latest revision ID and total count,
or a WP_Error if the post does not exist or revisions are not enabled.
Function Information
Since Version
6.1.0
Source File
wp-includes/revision.php
Advertisement