If you supply no title, WordPress will set the title to: (example)
(no title)
This will be shown in the list table for the post type in the admin area, within the database, the post_title
value will be empty.
As no title is supplied, WordPress will set the slug to: (example)
1234
…where 1234 is the ID of the object. The post_name
value in the database will receive the ID.
Of course if you are programmatically supplying a slug then you can set the slug to something more meaningful than the ID and this is where the save_post
hook comes in handy.
Important Note:
If you supply no content (value) for the post_content
field, then your post will be set to auto-draft
for the post_status
column.
So you might need to use the save_post
hook to set a default value for the post_content
field.