Make WordPress Core

Opened 9 years ago

Last modified 7 years ago

#35097 new enhancement

New filter: `edit_post_type_title`

Reported by: sebastianpisula's profile sebastian.pisula Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch 2nd-opinion
Focuses: Cc:


Filter in edit.php to filter title. Why ?

I filter this page by term and I want have title of current term


Attachments (1)

35097.patch (1.2 KB) - added by sebastian.pisula 9 years ago.

Download all attachments as: .zip

Change History (6)

#1 @sebastian.pisula
9 years ago

  • Keywords has-patch added

#2 @swissspidy
9 years ago

Hi there

Two questions:

  • Doesn't the post_type_labels_{$post_type} filter help here?
  • Why limit this to edit.php? What about editing terms?

#3 @sebastian.pisula
9 years ago

  1. I can't because taxonomy not exists yet. I use get_term_by and this function return false.
  2. Because I want filter title in page with posts list.

#4 @SergeyBiryukov
9 years ago

A workaround:

function wp35097_change_post_type_title_on_edit_screen() {
	global $post_type_object;
	$post_type_object->labels->name = 'My Custom Name';
add_action( 'admin_head-edit.php', 'wp35097_change_post_type_title_on_edit_screen' );

#5 @swissspidy
7 years ago

  • Keywords 2nd-opinion added

Why limit this to edit.php? What about editing terms?

What about a general function for printing the admin titles that can be filtered?

Note: See TracTickets for help on using tickets.