[wp-trac] [WordPress Trac] #42500: Enable Revisions when there is 1

WordPress Trac noreply at wordpress.org
Fri Nov 10 08:01:13 UTC 2017


#42500: Enable Revisions when there is 1
-----------------------------+------------------------------
 Reporter:  garrett-eclipse  |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Revisions        |     Version:  4.9
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:  administration
-----------------------------+------------------------------

Old description:

> Hello,
>
> I was trying to get revisions to appear for a post and found that it
> requires 2 revisions to operate due to the conditional;
>         if ( count( $revisions ) > 1 ) {
> https://github.com/WordPress/WordPress/blob/a72be13ec0b57a2831d75540fd1892d1bd121f3b
> /wp-admin/edit-form-advanced.php#L234
>
> Can this be amended to be > 0 or event just `if ( count( $revisions ) )
> {`
>
> Thanks

New description:

 Hello,

 I was trying to get revisions to appear for a post and found that it
 requires 2 revisions to operate due to the conditional;
 {{{
         if ( count( $revisions ) > 1 ) {
 }}}
 https://github.com/WordPress/WordPress/blob/a72be13ec0b57a2831d75540fd1892d1bd121f3b
 /wp-admin/edit-form-advanced.php#L234

 Can this be amended to be > 0 or event just `if ( count( $revisions ) ) {`

 Thanks

--

Comment (by dd32):

 For some context of why `> 1`, I believe that's due to the expected `auto-
 draft` which isn't really a revision.

 So you'd have 1 "revision" = Post + Auto-Draft (the auto-draft shouldn't
 have any real content at this point), and then 2 revisions = Post + Auto-
 Draft + First actual revision (that is different and can then be compared
 to).

 Displaying the link when there isn't any revisions at all doesn't seem
 like a very good UX to me, perhaps you can expand on why you think that'd
 be a good idea?

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


More information about the wp-trac mailing list