WordPress at a glance
function is not described

_draft_or_post_title() WP 2.7.0

Get the post title.

The post title is fetched and if it is blank then a default string is returned.

No Hooks.


String. The post title if set.


_draft_or_post_title( $post );
Post ID or WP_Post object.
Default: global $post

Code of draft or post title: wp-admin/includes/template.php VER 5.0.3

function _draft_or_post_title( $post = 0 ) {
	$title = get_the_title( $post );
	if ( empty( $title ) )
		$title = __( '(no title)' );
	return esc_html( $title );