[wp-trac] [WordPress Trac] #48846: Revision meta box is hidden when one revision

WordPress Trac noreply at wordpress.org
Sun Dec 1 04:57:55 UTC 2019


#48846: Revision meta box is hidden when one revision
--------------------------+-----------------------------
 Reporter:  ecairol       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:  5.3
 Severity:  minor         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 When editing a post, if there's only 1 revision associated with the post,
 the meta box will be hidden. The cause of this is the condition being >
 instead of >=

 On file: wp-admin/includes/meta-boxes.php
 {{{#!php
 <?php
 // We should aim to show the revisions meta box only when there are
 revisions.
 if ( count( $revisions ) > 1 ) {
 }}}

 If the aim is to show the box when there are revisions, even one, then the
 condition should have been $revisions >= 1.

 If you set your wp-config to store only 1 single revision per post, the
 meta-box won't display.

 I read the first step is opening this ticket, however I'm more than happy
 to open a PR with a fix.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48846>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list