Changeset 53841 for trunk/src/wp-includes/revision.php
- Timestamp:
- 08/05/2022 01:00:57 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/revision.php
r53779 r53841 534 534 * 535 535 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post. 536 * @return WP_Error|array { 537 * Returns associative array with latest revision ID and total count. 538 * 539 * @type int $revision The latest revision post ID or 0 if no revisions exist. 540 * @type int $count The total count of revisions for the given post. 536 * @return array|WP_Error { 537 * Returns associative array with latest revision ID and total count, 538 * or a WP_Error if the post does not exist or revisions are not enabled. 539 * 540 * @type int $latest_id The latest revision post ID or 0 if no revisions exist. 541 * @type int $count The total count of revisions for the given post. 541 542 * } 542 543 */ … … 568 569 if ( ! $revisions ) { 569 570 return array( 570 ' revision' => 0,571 'count' => 0,571 'latest_id' => 0, 572 'count' => 0, 572 573 ); 573 574 } 574 575 575 576 return array( 576 ' revision' => $revisions[0],577 'count' => $revision_query->found_posts,577 'latest_id' => $revisions[0], 578 'count' => $revision_query->found_posts, 578 579 ); 579 580 }
Note: See TracChangeset
for help on using the changeset viewer.