Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#23783 closed defect (bug) (fixed)

Update strings to reflect the changes in wp_post_revision_title()

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

Description

Background: #23497

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

Previously, it used to return the revision date and time:
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/post-template.php#L1294

Now it returns the revision author name first:
http://core.trac.wordpress.org/browser/trunk/wp-includes/post-template.php?rev=23653#L1319

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):
    http://codex.wordpress.org/Function_Reference/register_post_type#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 12 years ago.

Download all attachments as: .zip

Change History (7)

#1 @SergeyBiryukov
12 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
12 years ago

Replying to SergeyBiryukov:

The instance in revision.php is unused since [23506]:
http://core.trac.wordpress.org/browser/trunk/wp-admin/revision.php?rev=23639#L61

removed in next patch

#4 @adamsilverstein
12 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
12 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
12 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.