Opened 10 months ago
Closed 10 months ago
#56279 closed enhancement (fixed)
Use wp_get_latest_revision_id_and_total_count() where appropriate
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | 6.1 |
Component: | Revisions | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
Background: #55857
A new function wp_get_latest_revision_id_and_total_count()
, with an optimized query to get the last revision ID and total count, was introduced in [53759], [53769], and [53778].
As noted in comment:4:ticket:55857, there are a few other places in core that could use it.
Attachments (3)
Change History (9)
#2
follow-up:
↓ 3
@
10 months ago
I've reopened #55857 to rename the function to wp_get_latest_revision_id_and_total_count()
so the function follows the conventional term used for getting latest posts, comments, etc.
Please hold of committing this change until the rename is complete.
#3
in reply to:
↑ 2
@
10 months ago
- Keywords needs-refresh removed
Replying to peterwilsoncc:
I've reopened #55857 to rename the function to
wp_get_latest_revision_id_and_total_count()
so the function follows the conventional term used for getting latest posts, comments, etc.
Thanks! 56279.2.diff switches to "latest" and removes the extra semicolon from the previous patch.
There may be more instances where the function can be used, these are just the ones I found at a glance.
#4
@
10 months ago
- Description modified (diff)
- Summary changed from Use wp_get_last_revision_id_and_total_count() where appropriate to Use wp_get_latest_revision_id_and_total_count() where appropriate
One extra semicolon is added in the patch, file
wp-includes\revision.php
. Can you please remove it?