Make WordPress Core

Opened 11 years ago

Closed 14 months ago

#35097 closed enhancement (wontfix)

New filter: `edit_post_type_title`

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

Description

Filter in edit.php to filter title. Why ?

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

edit.php?post_type=investor-day&funds-categories=title

Attachments (1)

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

Download all attachments as: .zip

Change History (7)

#1 @sebastian.pisula
11 years ago

  • Keywords has-patch added

#2 @swissspidy
11 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
11 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
11 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
10 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?

#6 @SirLouen
14 months ago

  • Milestone Awaiting Review
  • Resolution → wontfix
  • Status new → closed

Proposal by Sergey simply works for this purpose.

No need for this filter. Closing with wontfix

Note: See TracTickets for help on using tickets.