[wp-trac] [WordPress Trac] #9681: Add hooks to allow a plugin to support the deletion of unneeded revisions

WordPress Trac noreply at wordpress.org
Wed Sep 2 15:17:33 UTC 2015


#9681: Add hooks to allow a plugin to support the deletion of unneeded revisions
------------------------------------+------------------------------
 Reporter:  Denis-de-Bernardy       |       Owner:  adamsilverstein
     Type:  feature request         |      Status:  assigned
 Priority:  low                     |   Milestone:  Future Release
Component:  Revisions               |     Version:  2.8
 Severity:  minor                   |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------
Changes (by adamsilverstein):

 * keywords:  need-patch => has-patch dev-feedback
 * owner:   => adamsilverstein
 * status:  new => assigned


Comment:

 In [attachement:9681.2.diff]:
 * Add a filter for the actions available in the revisions list meta box
 (currently none).

 This allows plugin authors to add links to end of each line in the
 revisions list meta box. Although we hide this meta box by default, some
 users may still prefer this overview of their revisions and want a way to
 add management features. This hook adds that capability and can be used to
 resolve the original issue raised in this ticket.

 I created a simple plugin demonstrating how this hook can be used :
 https://github.com/adamsilverstein/wp-post-revision-delete-action

 With this patch in place and the plugin active, the meta revisions list
 gets new Delete options:

 [[Image(http://cl.ly/image/3Z2Q3g1A0P0s/Edit_Post__sadasd__WordPress_2015-09-02_09-12-50.jpg)]]

 After deleting the revision, the user sees a confirmation message and
 revision is gone:

 [[Image(http://cl.ly/image/3L2k2b2k2Y3c/Edit_Post__sadasd__WordPress_2015-09-02_09-13-17.jpg)]]

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


More information about the wp-trac mailing list