[wp-trac] [WordPress Trac] #39062: New function: `wp_get_post_revisions_url()`

WordPress Trac noreply at wordpress.org
Sun Sep 26 14:52:50 UTC 2021


#39062: New function: `wp_get_post_revisions_url()`
-------------------------------------------------+-------------------------
 Reporter:  georgestephanis                      |       Owner:
                                                 |  adamsilverstein
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Revisions                            |     Version:  2.2
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:
  note                                           |
-------------------------------------------------+-------------------------
Changes (by audrasjb):

 * keywords:  has-patch has-unit-tests needs-refresh needs-testing needs-
     dev-note => has-patch has-unit-tests needs-dev-note


Comment:

 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/39062#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list