The post title is fetched and if it is blank then a default string is returned. Copied from wp-admin/includes/template.php, but we can't include that file because: <ol> <li>It causes bugs with test fixture generation and strange Docker 255 error codes.</li> <li>It's in the admin; ideally we <em>shouldn't</em> be including files from the admin for a block's output. It's a very small/simple function as well, so duplicating it isn't too terrible.</li> </ol>
Parameters
$postint|WP_Postoptional
Post ID or WP_Post object. Default is global $post.Default: 0
Return
string
The post title if set; "(no title)" if no title is set.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 6.8.8 tag, from src/wp-includes/blocks/latest-comments.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.