Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#23903 closed enhancement (fixed)

Revisions compare tweaks: Title, "To:" header

Reported by: markjaquith Owned by: ocean90
Milestone: 3.6 Priority: normal
Severity: normal Version: 3.6
Component: Revisions Keywords: has-patch dev-feedback
Focuses: Cc:

Description (last modified by markjaquith)


  1. The "To:" header doesn't make sense when looking at a single revision. It should just show the revision. No "To:" prefix.
  2. The first line of the Diff is the title. But that isn't made clear. It just looks like part of the text. Maybe, if there is a title diff, that should be prefixed with "Title:".

To summarize: less prefixing except when more prefixing.

Attachments (7)

23903.patch (2.6 KB) - added by faishal 9 years ago.
preview.png (19.0 KB) - added by faishal 9 years ago.
patch preview
23903.diff (1.4 KB) - added by adamsilverstein 9 years ago.
23903.png (92.7 KB) - added by ocean90 9 years ago.
23903.2.diff (1.9 KB) - added by SergeyBiryukov 9 years ago.
23903.3.diff (3.3 KB) - added by ocean90 9 years ago.
23903.4.diff (4.0 KB) - added by ocean90 9 years ago.

Download all attachments as: .zip

Change History (15)

#1 follow-up: @markjaquith
9 years ago

  • Description modified (diff)

#2 in reply to: ↑ 1 @adamsilverstein
9 years ago

  • Cc adamsilverstein@… added

Replying to markjaquith:

also excerpt field is revisioned and will show up too & probably needs a label

#3 @ocean90
9 years ago

  • Keywords needs-patch added

9 years ago

9 years ago

patch preview

#4 follow-up: @faishal
9 years ago

  • Cc faishal added
  • Keywords has-patch added; needs-patch removed

#5 in reply to: ↑ 4 @adamsilverstein
9 years ago

  • Keywords dev-feedback added

Replying to faishal:

thank you for you patch!

it worked as expected but i reworked a couple of things in 23903.diff

  • show/hide the To: area using only CSS, no JS required as we area already adding a class to a parent div when the user switches to the compare two mode
  • cleaned up the label creation as per WordPress coding standards

also, please note that its best to generate your diff from the root, that makes it easier to apply for testing :)

9 years ago


#6 @adamsilverstein
9 years ago

nice change, looks good. thanks.

#7 @SergeyBiryukov
9 years ago

To clarify: __( ucfirst( str_replace( 'post_', '', $field ) ) ) may work in this case, because we already have the strings in _wp_post_revision_fields():

But it's not a good example of i18n, as gettext won't be able to parse it:

23903.2.diff reuses the strings from _wp_post_revision_fields().

9 years ago

9 years ago

#8 @ocean90
9 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 23994:

Revisions UI: Remove the "To:" prefix from the header when viewing a single revision. Also prefix a revision field with a label.

props SergeyBiryukov, adamsilverstein, faishal. fixes #23903.

Note: See TracTickets for help on using tickets.