#39062 closed enhancement (fixed)
New function: `wp_get_post_revisions_url()`
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | 2.2 |
Component: | Revisions | Keywords: | has-patch has-unit-tests commit has-dev-note |
Focuses: | Cc: |
Description
There's no good way to get a link to revisions for a given post short of trying to build it manually. Feels like it would be a useful utility function for core.
Patch and unit test attached.
Attachments (2)
Change History (23)
#4
@
6 years ago
- Keywords needs-refresh needs-testing added
- Milestone set to Future Release
- Version set to 2.2
This still seems useful, reopening for consideration.
This ticket was mentioned in Slack in #core by david.baumwald. View the logs.
5 years ago
#10
@
5 years ago
Note: from our bugscrub review this will need a refresh to add @since
to the new function and @ticket
to the unit test
#11
@
5 years ago
- Keywords needs-dev-note added
This ticket still needs a refresh and testing, and with 5.4 Beta 1 landing tomorrow, this is being moved to Future Release
. If any maintainer or committer feels this can be included in 5.4 or wishes to assume ownership during a specific cycle, feel free to update the milestone accordingly.
Also marking for a dev note as it at least deserves a small call-out on the Misc Dev Note.
#13
@
5 years ago
I wasn't able to spend time on this for 5.4, I'll get it in early in the next cycle!
@
3 years ago
Revisions: Introduce wp_get_post_revisions_url()
to get the URL of the revisions screen for a given post.
#14
@
3 years ago
- Keywords needs-refresh needs-testing removed
I agree this would be a nice-to-have.
39062.1.diff
refreshes the previous patch against trunk and fixes some issues in the docblock.
The patch works fine on my side.
To test it, simply open your theme's files then go to the template file of your choice and add this line:
<?php echo wp_get_post_revisions_url( get_the_ID() ); ?>
It will display the URL to the revisions screen for the current post.
Moving for 5.9 consideration.
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
3 years ago
#17
@
3 years ago
- Owner changed from adamsilverstein to hellofromTonya
- Status changed from assigned to reviewing
This ticket was mentioned in PR #1849 on WordPress/wordpress-develop by costdev.
3 years ago
#18
wp_get_post_revisions_url()
gets a link to revisions for a given post.
Trac ticket: https://core.trac.wordpress.org/ticket/39062
#19
@
3 years ago
- Keywords commit added
The PR looks good on my side. Unit tests are passing and look relevant to me.
Marking this for commit
consideration.
hellofromtonya commented on PR #1849:
3 years ago
#21
Committed via changeset https://core.trac.wordpress.org/changeset/52095.
Hey George, wouldn't this be more of a feature request than a bug?