Opened 3 years ago

Closed 3 years ago

#5940 closed defect (bug) (fixed)

Plugin Directory: Editing plugin has errant %s

Reported by: ipstenu's profile Ipstenu Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: Priority: normal
Component: Plugin Directory Keywords:


While editing plugins, the name of the page becomes:

Editing Plugin: %s "Plugin Name"

That appears to be from

I honestly only noticed it this week. I can't find a recent change that tweaked that.

Other similar code lines look like this:

'edit_item'          => sprintf( __( 'Edit %s', 'wporg-forums' ), $this->singular ),

So I think the attached diff is the right fix as there's no need for a singular like that...

Attachments (3)

5940.diff (948 bytes) - added by Ipstenu 3 years ago.
5940.2.diff (1.5 KB) - added by SergeyBiryukov 3 years ago.
5940.3.diff (2.5 KB) - added by SergeyBiryukov 3 years ago.

Download all attachments as: .zip

Change History (6)

3 years ago

#1 @SergeyBiryukov
3 years ago

It looks like this is a result of a WP core change in [WP51969], which aims to include the title of the post being edited in the <title> tag.

I haven't tested 5940.diff yet. At a glance, I think it would fix the page title, but break the <h1> heading on the screen: Editing Plugin: Gutenberg would become just Editing Plugin:, as the replace_title_global() method would no longer have the placeholder to replace.

So I think this needs some more work. Maybe adjusting replace_title_global() to match the core change would be enough. See 5940.2.diff.

#2 @SergeyBiryukov
3 years ago

5940.3.diff fixes duplicated plugin name and runs the replacement only once instead of three times (for each do_meta_boxes action call).

#3 @SergeyBiryukov
3 years ago

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

In 11312:

Plugin Directory: Remove extra placeholder in the title on Edit Plugin screen.

Make sure the title replacement to include the plugin name only runs once in the appropriate context.

Follow-up to [2655], [2829], [WP51969].

Props Ipstenu, SergeyBiryukov.
Fixes #5940.

Note: See TracTickets for help on using tickets.