Opened 3 years ago
Closed 3 years ago
#5940 closed defect (bug) (fixed)
Plugin Directory: Editing plugin has errant %s
Reported by: | Ipstenu | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Plugin Directory | Keywords: | |
Cc: |
Description
While editing plugins, the name of the page becomes:
Editing Plugin: %s "Plugin Name"
That appears to be from https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php#L173
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)
Change History (6)
#2
@
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).
Note: See
TracTickets for help on using
tickets.
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 justEditing 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.