# edit-flow/0.7.4/common/php/util.php

Edit Flow, version 0.7.4. 16 lines.

- Page: https://pluginprobe.com/plugins/edit-flow/0.7.4/code/common/php/util.php
- Raw: https://pluginprobe.com/plugins/edit-flow/0.7.4/raw/common/php/util.php
- Modified: 2012-01-09T21:19:52+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/edit-flow/0.7.4/code/common/php/util.php#L10-L20`.

```php
<?php

if( ! function_exists( 'ef_draft_or_post_title' ) ) :
	/**
	 * Copy of core's _draft_or_post_title without the filters
	 *
	 * The post title is fetched and if it is blank then a default string is
	 * returned.
	 * @param int $post_id The post id. If not supplied the global $post is used.
	 * @return string The post title if set
	 */
	function ef_draft_or_post_title( $post_id = 0 ) {
		$post = get_post( $post_id );
		return ! empty( $post->post_title ) ? $post->post_title : __( '(no title)', 'edit-flow' );
	}
endif;
```
