Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#23783 closed defect (bug) (fixed)

Update strings to reflect the changes in wp_post_revision_title()

Reported by: SergeyBiryukov Owned by:
Milestone: 3.6 Priority: normal
Severity: normal Version: 3.6
Component: Revisions Keywords:
Focuses: Cc:


Background: #23497

wp_post_revision_title() got a backward-incompatible change in [23506].

Previously, it used to return the revision date and time:

Now it returns the revision author name first:

This creates three issues:

  1. The strings in edit-form-advanced.php still expect date and time first:
    http://core.trac.wordpress.org/browser/trunk/wp-admin/edit-form-advanced.php?rev=23683#L39 Changing "from" to "by" and updating the translator comment would probably be enough. However, that still might be incompatible with custom strings (see "Customizing the messages" example):
  2. The "by (author name)" part in the list of revisions is redundant (see the screenshot).
  3. wp_post_revision_title() inline description should be updated.

Attachments (1)

23783.revisions-meta-box.png (16.8 KB) - added by SergeyBiryukov 3 years ago.

Download all attachments as: .zip

Change History (7)

#1 @SergeyBiryukov
3 years ago

Another option might be to revert the changes to wp_post_revision_title() and introduce a new function.

#3 in reply to: ↑ 2 @adamsilverstein
3 years ago

Replying to SergeyBiryukov:

The instance in revision.php is unused since [23506]:

removed in next patch

#4 @adamsilverstein
3 years ago

i believe i addressed the main issue in my latest patch by breaking out the code as a new function. the new function still needs updated phpdoc and translator instructions, but at least it won't interfere with other code using wp_post_revision_title() like the one you found or a plugin.

#5 @adamsilverstein
3 years ago

  • Cc adamsilverstein@… added
  • Keywords dev-feedback close added

can you please review and see if this ticket can be closed, its fixed now in truck i think, at least with translator comments

#6 @SergeyBiryukov
3 years ago

  • Keywords dev-feedback close removed
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [23769].

Note: See TracTickets for help on using tickets.