Description
The Post Title block currently hardcodes "Title" as the preview text and "(no title)" as the placeholder for empty titles. There's no way for custom post types to customize these strings.
In the classic editor, the enter_title_here filter allowed plugins to change the placeholder per post type. There's no equivalent mechanism for the Post Title block in the site/post editor.
Proposal
Extend the post type supports registration so that title can accept an array with a placeholder option:
'supports' => array(
'title' => array( 'placeholder' => 'Add product name' ),
),
The Post Title block should read this value from the REST API's post type data and use it for:
- The static preview text (instead of "Title")
- The editable input placeholder (instead of "(no title)")
- The linked title fallback text
This aligns with how other supports (like editor) already accept extended configuration.
Edit: We have introduced a new placeholder attribute to replace the literal Title string.
Description
The Post Title block currently hardcodes
"Title"as the preview text and"(no title)"as the placeholder for empty titles. There's no way for custom post types to customize these strings.In the classic editor, the
enter_title_herefilter allowed plugins to change the placeholder per post type. There's no equivalent mechanism for the Post Title block in the site/post editor.Proposal
Extend the post type
supportsregistration so thattitlecan accept an array with aplaceholderoption:The Post Title block should read this value from the REST API's post type data and use it for:
This aligns with how other supports (like
editor) already accept extended configuration.Edit: We have introduced a new
placeholderattribute to replace the literalTitlestring.