WordPress.org

Make WordPress Core

Opened 10 months ago

Closed 10 months ago

Last modified 8 months ago

#44794 closed defect (bug) (fixed)

Display registered `new_item` text from post post type in My Sites menu

Reported by: jeremyfelt Owned by: jeremyfelt
Milestone: 5.1 Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: good-first-bug has-patch
Focuses: multisite Cc:

Description

Each site in the "My Sites" menu is hard coded to display "New Post" even if the default post type arguments for posts have been filtered.

Instead of using "New Post", we should be able to use get_post_type_object( 'post' )->labels->new_item in this area of admin-bar.php.

Attachments (1)

44794.patch (474 bytes) - added by nahuelmahe 10 months ago.
Edited admin-bar.php to remove hard coded "New Post" text from Multi-site admin bar

Download all attachments as: .zip

Change History (6)

@nahuelmahe
10 months ago

Edited admin-bar.php to remove hard coded "New Post" text from Multi-site admin bar

#1 @nahuelmahe
10 months ago

  • Keywords has-patch added; needs-patch removed

Hello jeremyfelt, thank you for reporting that issue. I generated a patch file with your solution, let me know if that what you expected.

#2 @jeremyfelt
10 months ago

  • Milestone changed from Future Release to 5.0
  • Owner set to jeremyfelt
  • Status changed from new to reviewing

This looks great @nahuelmahe, thanks for the patch!

#3 @jeremyfelt
10 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 43590:

Multisite: Display registered new_item text for post post type in My Sites menu.

Previously, the My Sites menu would show "New Post" even if the post post type labels had been filtered to different values.

Props nahuelmahe.
Fixes #44794.

#4 @nahuelmahe
10 months ago

Thank you @jeremyfelt 

#5 @flixos90
8 months ago

  • Milestone changed from 5.0 to 5.1
Note: See TracTickets for help on using tickets.