wp_get_latest_revision_id_and_total_count


wp_get_latest_revision_id_and_total_count ( $post = 0 )

Parameters:
  • (int|WP_Post) post Optional. Post ID or WP_Post object. Default is global $post.
Returns:
  • (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. @type int $latest_id The latest revision post ID or 0 if no revisions exist. @type int $count The total count of revisions for the given post. }
Defined at:

Description

Returns the latest revision ID and count of revisions for a post.

Related Functions

_wp_get_post_revision_version, wp_get_post_revisions_url, _wp_post_revision_data, wp_get_post_revision, wp_get_post_revisions

Top Google Results

User discussions

wpseek mobile