WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#36425 closed enhancement (duplicate)

Register post type name of "title"

Reported by: Compute Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4.2
Component: Posts, Post Types Keywords:
Focuses: ui, administration Cc:

Description

Some releases ago WP introduced more strings to be changed from the register_post_type arguments:

https://make.wordpress.org/core/2015/12/11/additional-labels-for-custom-post-types-and-custom-taxonomies/

Would it be possible to add a new argument for the "Title" placeholder text that currently says "Enter title here"?

Depending on the post type it may not always be a "Title". It could be the name of a company or a name of a member. Calling it title would not always be ideal for custom post types using the title field for something other that the headline of an article.

Change History (3)

#1 @Compute
3 years ago

  • Focuses ui administration added

#2 @andg
3 years ago

It's not a bad idea, actually, but nothing you can't do already using the enter_title_here filter. For example:

add_filter( 'enter_title_here', function( $title, $post ) {
	if ( $post->post_type === 'your-post-type' ) {
		$title = __( 'Enter Company Name' );
	}

	return $title;
}, 10, 2 );

#3 @ocean90
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Type changed from feature request to enhancement

Duplicate of #28465.

Note: See TracTickets for help on using tickets.