Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#44794 closed defect (bug) (fixed)

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

Reported by: jeremyfelt's profile jeremyfelt Owned by: jeremyfelt's profile 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 7 years 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
7 years ago

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

#1 @nahuelmahe
7 years 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
6 years 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
6 years 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
6 years ago

Thank you @jeremyfelt 

#5 @flixos90
6 years ago

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